[bot] Update dist directory

This commit is contained in:
bigdaz 2024-07-19 17:08:28 +00:00 committed by github-actions[bot]
parent 514ac344fc
commit 77266ec345
8 changed files with 80 additions and 16 deletions

View file

@ -145752,7 +145752,7 @@ async function installGradleVersion(versionInfo) {
}); });
} }
async function locateGradleAndDownloadIfRequired(versionInfo) { async function locateGradleAndDownloadIfRequired(versionInfo) {
const installsDir = path.join(os.homedir(), 'gradle-installations/installs'); const installsDir = path.join(getProvisionDir(), 'installs');
const installDir = path.join(installsDir, `gradle-${versionInfo.version}`); const installDir = path.join(installsDir, `gradle-${versionInfo.version}`);
if (fs.existsSync(installDir)) { if (fs.existsSync(installDir)) {
core.info(`Gradle installation already exists at ${installDir}`); core.info(`Gradle installation already exists at ${installDir}`);
@ -145767,7 +145767,7 @@ async function locateGradleAndDownloadIfRequired(versionInfo) {
return executable; return executable;
} }
async function downloadAndCacheGradleDistribution(versionInfo) { async function downloadAndCacheGradleDistribution(versionInfo) {
const downloadPath = path.join(os.homedir(), `gradle-installations/downloads/gradle-${versionInfo.version}-bin.zip`); const downloadPath = path.join(getProvisionDir(), `downloads/gradle-${versionInfo.version}-bin.zip`);
const cacheConfig = new configuration_1.CacheConfig(); const cacheConfig = new configuration_1.CacheConfig();
if (cacheConfig.isCacheDisabled()) { if (cacheConfig.isCacheDisabled()) {
await downloadGradleDistribution(versionInfo, downloadPath); await downloadGradleDistribution(versionInfo, downloadPath);
@ -145796,6 +145796,10 @@ async function downloadAndCacheGradleDistribution(versionInfo) {
} }
return downloadPath; return downloadPath;
} }
function getProvisionDir() {
const tmpDir = process.env['RUNNER_TEMP'] ?? os.tmpdir();
return path.join(tmpDir, `.gradle-actions/gradle-installations`);
}
async function downloadGradleDistribution(versionInfo, downloadPath) { async function downloadGradleDistribution(versionInfo, downloadPath) {
await toolCache.downloadTool(versionInfo.downloadUrl, downloadPath); await toolCache.downloadTool(versionInfo.downloadUrl, downloadPath);
core.info(`Downloaded ${versionInfo.downloadUrl} to ${downloadPath} (size ${fs.statSync(downloadPath).size})`); core.info(`Downloaded ${versionInfo.downloadUrl} to ${downloadPath} (size ${fs.statSync(downloadPath).size})`);
@ -146043,6 +146047,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.checkNoInvalidWrapperJars = exports.complete = exports.setup = void 0; exports.checkNoInvalidWrapperJars = exports.complete = exports.setup = void 0;
const core = __importStar(__nccwpck_require__(42186)); const core = __importStar(__nccwpck_require__(42186));
const exec = __importStar(__nccwpck_require__(71514)); const exec = __importStar(__nccwpck_require__(71514));
const fs = __importStar(__nccwpck_require__(57147));
const path = __importStar(__nccwpck_require__(71017)); const path = __importStar(__nccwpck_require__(71017));
const os = __importStar(__nccwpck_require__(22037)); const os = __importStar(__nccwpck_require__(22037));
const caches = __importStar(__nccwpck_require__(87504)); const caches = __importStar(__nccwpck_require__(87504));
@ -146101,7 +146106,18 @@ async function determineGradleUserHome() {
const rootDir = (0, configuration_1.getWorkspaceDirectory)(); const rootDir = (0, configuration_1.getWorkspaceDirectory)();
return path.resolve(rootDir, customGradleUserHome); return path.resolve(rootDir, customGradleUserHome);
} }
return path.resolve(await determineUserHome(), '.gradle'); const defaultGradleUserHome = path.resolve(await determineUserHome(), '.gradle');
if (fs.existsSync(defaultGradleUserHome)) {
core.info(`Gradle User Home already exists at ${defaultGradleUserHome}`);
return defaultGradleUserHome;
}
if (os.platform() === 'win32' && defaultGradleUserHome.startsWith('C:\\') && fs.existsSync('D:\\a\\')) {
const fasterGradleUserHome = 'D:\\a\\.gradle';
core.info(`Setting GRADLE_USER_HOME to ${fasterGradleUserHome} to leverage (potentially) faster drive.`);
core.exportVariable('GRADLE_USER_HOME', fasterGradleUserHome);
return fasterGradleUserHome;
}
return defaultGradleUserHome;
} }
async function determineUserHome() { async function determineUserHome() {
const output = await exec.getExecOutput('java', ['-XshowSettings:properties', '-version'], { silent: true }); const output = await exec.getExecOutput('java', ['-XshowSettings:properties', '-version'], { silent: true });

File diff suppressed because one or more lines are too long

View file

@ -99432,7 +99432,7 @@ async function installGradleVersion(versionInfo) {
}); });
} }
async function locateGradleAndDownloadIfRequired(versionInfo) { async function locateGradleAndDownloadIfRequired(versionInfo) {
const installsDir = path.join(os.homedir(), 'gradle-installations/installs'); const installsDir = path.join(getProvisionDir(), 'installs');
const installDir = path.join(installsDir, `gradle-${versionInfo.version}`); const installDir = path.join(installsDir, `gradle-${versionInfo.version}`);
if (fs.existsSync(installDir)) { if (fs.existsSync(installDir)) {
core.info(`Gradle installation already exists at ${installDir}`); core.info(`Gradle installation already exists at ${installDir}`);
@ -99447,7 +99447,7 @@ async function locateGradleAndDownloadIfRequired(versionInfo) {
return executable; return executable;
} }
async function downloadAndCacheGradleDistribution(versionInfo) { async function downloadAndCacheGradleDistribution(versionInfo) {
const downloadPath = path.join(os.homedir(), `gradle-installations/downloads/gradle-${versionInfo.version}-bin.zip`); const downloadPath = path.join(getProvisionDir(), `downloads/gradle-${versionInfo.version}-bin.zip`);
const cacheConfig = new configuration_1.CacheConfig(); const cacheConfig = new configuration_1.CacheConfig();
if (cacheConfig.isCacheDisabled()) { if (cacheConfig.isCacheDisabled()) {
await downloadGradleDistribution(versionInfo, downloadPath); await downloadGradleDistribution(versionInfo, downloadPath);
@ -99476,6 +99476,10 @@ async function downloadAndCacheGradleDistribution(versionInfo) {
} }
return downloadPath; return downloadPath;
} }
function getProvisionDir() {
const tmpDir = process.env['RUNNER_TEMP'] ?? os.tmpdir();
return path.join(tmpDir, `.gradle-actions/gradle-installations`);
}
async function downloadGradleDistribution(versionInfo, downloadPath) { async function downloadGradleDistribution(versionInfo, downloadPath) {
await toolCache.downloadTool(versionInfo.downloadUrl, downloadPath); await toolCache.downloadTool(versionInfo.downloadUrl, downloadPath);
core.info(`Downloaded ${versionInfo.downloadUrl} to ${downloadPath} (size ${fs.statSync(downloadPath).size})`); core.info(`Downloaded ${versionInfo.downloadUrl} to ${downloadPath} (size ${fs.statSync(downloadPath).size})`);
@ -99723,6 +99727,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.checkNoInvalidWrapperJars = exports.complete = exports.setup = void 0; exports.checkNoInvalidWrapperJars = exports.complete = exports.setup = void 0;
const core = __importStar(__nccwpck_require__(2186)); const core = __importStar(__nccwpck_require__(2186));
const exec = __importStar(__nccwpck_require__(1514)); const exec = __importStar(__nccwpck_require__(1514));
const fs = __importStar(__nccwpck_require__(7147));
const path = __importStar(__nccwpck_require__(1017)); const path = __importStar(__nccwpck_require__(1017));
const os = __importStar(__nccwpck_require__(2037)); const os = __importStar(__nccwpck_require__(2037));
const caches = __importStar(__nccwpck_require__(7504)); const caches = __importStar(__nccwpck_require__(7504));
@ -99781,7 +99786,18 @@ async function determineGradleUserHome() {
const rootDir = (0, configuration_1.getWorkspaceDirectory)(); const rootDir = (0, configuration_1.getWorkspaceDirectory)();
return path.resolve(rootDir, customGradleUserHome); return path.resolve(rootDir, customGradleUserHome);
} }
return path.resolve(await determineUserHome(), '.gradle'); const defaultGradleUserHome = path.resolve(await determineUserHome(), '.gradle');
if (fs.existsSync(defaultGradleUserHome)) {
core.info(`Gradle User Home already exists at ${defaultGradleUserHome}`);
return defaultGradleUserHome;
}
if (os.platform() === 'win32' && defaultGradleUserHome.startsWith('C:\\') && fs.existsSync('D:\\a\\')) {
const fasterGradleUserHome = 'D:\\a\\.gradle';
core.info(`Setting GRADLE_USER_HOME to ${fasterGradleUserHome} to leverage (potentially) faster drive.`);
core.exportVariable('GRADLE_USER_HOME', fasterGradleUserHome);
return fasterGradleUserHome;
}
return defaultGradleUserHome;
} }
async function determineUserHome() { async function determineUserHome() {
const output = await exec.getExecOutput('java', ['-XshowSettings:properties', '-version'], { silent: true }); const output = await exec.getExecOutput('java', ['-XshowSettings:properties', '-version'], { silent: true });

File diff suppressed because one or more lines are too long

View file

@ -145741,7 +145741,7 @@ async function installGradleVersion(versionInfo) {
}); });
} }
async function locateGradleAndDownloadIfRequired(versionInfo) { async function locateGradleAndDownloadIfRequired(versionInfo) {
const installsDir = path.join(os.homedir(), 'gradle-installations/installs'); const installsDir = path.join(getProvisionDir(), 'installs');
const installDir = path.join(installsDir, `gradle-${versionInfo.version}`); const installDir = path.join(installsDir, `gradle-${versionInfo.version}`);
if (fs.existsSync(installDir)) { if (fs.existsSync(installDir)) {
core.info(`Gradle installation already exists at ${installDir}`); core.info(`Gradle installation already exists at ${installDir}`);
@ -145756,7 +145756,7 @@ async function locateGradleAndDownloadIfRequired(versionInfo) {
return executable; return executable;
} }
async function downloadAndCacheGradleDistribution(versionInfo) { async function downloadAndCacheGradleDistribution(versionInfo) {
const downloadPath = path.join(os.homedir(), `gradle-installations/downloads/gradle-${versionInfo.version}-bin.zip`); const downloadPath = path.join(getProvisionDir(), `downloads/gradle-${versionInfo.version}-bin.zip`);
const cacheConfig = new configuration_1.CacheConfig(); const cacheConfig = new configuration_1.CacheConfig();
if (cacheConfig.isCacheDisabled()) { if (cacheConfig.isCacheDisabled()) {
await downloadGradleDistribution(versionInfo, downloadPath); await downloadGradleDistribution(versionInfo, downloadPath);
@ -145785,6 +145785,10 @@ async function downloadAndCacheGradleDistribution(versionInfo) {
} }
return downloadPath; return downloadPath;
} }
function getProvisionDir() {
const tmpDir = process.env['RUNNER_TEMP'] ?? os.tmpdir();
return path.join(tmpDir, `.gradle-actions/gradle-installations`);
}
async function downloadGradleDistribution(versionInfo, downloadPath) { async function downloadGradleDistribution(versionInfo, downloadPath) {
await toolCache.downloadTool(versionInfo.downloadUrl, downloadPath); await toolCache.downloadTool(versionInfo.downloadUrl, downloadPath);
core.info(`Downloaded ${versionInfo.downloadUrl} to ${downloadPath} (size ${fs.statSync(downloadPath).size})`); core.info(`Downloaded ${versionInfo.downloadUrl} to ${downloadPath} (size ${fs.statSync(downloadPath).size})`);
@ -146032,6 +146036,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.checkNoInvalidWrapperJars = exports.complete = exports.setup = void 0; exports.checkNoInvalidWrapperJars = exports.complete = exports.setup = void 0;
const core = __importStar(__nccwpck_require__(42186)); const core = __importStar(__nccwpck_require__(42186));
const exec = __importStar(__nccwpck_require__(71514)); const exec = __importStar(__nccwpck_require__(71514));
const fs = __importStar(__nccwpck_require__(57147));
const path = __importStar(__nccwpck_require__(71017)); const path = __importStar(__nccwpck_require__(71017));
const os = __importStar(__nccwpck_require__(22037)); const os = __importStar(__nccwpck_require__(22037));
const caches = __importStar(__nccwpck_require__(87504)); const caches = __importStar(__nccwpck_require__(87504));
@ -146090,7 +146095,18 @@ async function determineGradleUserHome() {
const rootDir = (0, configuration_1.getWorkspaceDirectory)(); const rootDir = (0, configuration_1.getWorkspaceDirectory)();
return path.resolve(rootDir, customGradleUserHome); return path.resolve(rootDir, customGradleUserHome);
} }
return path.resolve(await determineUserHome(), '.gradle'); const defaultGradleUserHome = path.resolve(await determineUserHome(), '.gradle');
if (fs.existsSync(defaultGradleUserHome)) {
core.info(`Gradle User Home already exists at ${defaultGradleUserHome}`);
return defaultGradleUserHome;
}
if (os.platform() === 'win32' && defaultGradleUserHome.startsWith('C:\\') && fs.existsSync('D:\\a\\')) {
const fasterGradleUserHome = 'D:\\a\\.gradle';
core.info(`Setting GRADLE_USER_HOME to ${fasterGradleUserHome} to leverage (potentially) faster drive.`);
core.exportVariable('GRADLE_USER_HOME', fasterGradleUserHome);
return fasterGradleUserHome;
}
return defaultGradleUserHome;
} }
async function determineUserHome() { async function determineUserHome() {
const output = await exec.getExecOutput('java', ['-XshowSettings:properties', '-version'], { silent: true }); const output = await exec.getExecOutput('java', ['-XshowSettings:properties', '-version'], { silent: true });

File diff suppressed because one or more lines are too long

View file

@ -145732,7 +145732,7 @@ async function installGradleVersion(versionInfo) {
}); });
} }
async function locateGradleAndDownloadIfRequired(versionInfo) { async function locateGradleAndDownloadIfRequired(versionInfo) {
const installsDir = path.join(os.homedir(), 'gradle-installations/installs'); const installsDir = path.join(getProvisionDir(), 'installs');
const installDir = path.join(installsDir, `gradle-${versionInfo.version}`); const installDir = path.join(installsDir, `gradle-${versionInfo.version}`);
if (fs.existsSync(installDir)) { if (fs.existsSync(installDir)) {
core.info(`Gradle installation already exists at ${installDir}`); core.info(`Gradle installation already exists at ${installDir}`);
@ -145747,7 +145747,7 @@ async function locateGradleAndDownloadIfRequired(versionInfo) {
return executable; return executable;
} }
async function downloadAndCacheGradleDistribution(versionInfo) { async function downloadAndCacheGradleDistribution(versionInfo) {
const downloadPath = path.join(os.homedir(), `gradle-installations/downloads/gradle-${versionInfo.version}-bin.zip`); const downloadPath = path.join(getProvisionDir(), `downloads/gradle-${versionInfo.version}-bin.zip`);
const cacheConfig = new configuration_1.CacheConfig(); const cacheConfig = new configuration_1.CacheConfig();
if (cacheConfig.isCacheDisabled()) { if (cacheConfig.isCacheDisabled()) {
await downloadGradleDistribution(versionInfo, downloadPath); await downloadGradleDistribution(versionInfo, downloadPath);
@ -145776,6 +145776,10 @@ async function downloadAndCacheGradleDistribution(versionInfo) {
} }
return downloadPath; return downloadPath;
} }
function getProvisionDir() {
const tmpDir = process.env['RUNNER_TEMP'] ?? os.tmpdir();
return path.join(tmpDir, `.gradle-actions/gradle-installations`);
}
async function downloadGradleDistribution(versionInfo, downloadPath) { async function downloadGradleDistribution(versionInfo, downloadPath) {
await toolCache.downloadTool(versionInfo.downloadUrl, downloadPath); await toolCache.downloadTool(versionInfo.downloadUrl, downloadPath);
core.info(`Downloaded ${versionInfo.downloadUrl} to ${downloadPath} (size ${fs.statSync(downloadPath).size})`); core.info(`Downloaded ${versionInfo.downloadUrl} to ${downloadPath} (size ${fs.statSync(downloadPath).size})`);
@ -146023,6 +146027,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.checkNoInvalidWrapperJars = exports.complete = exports.setup = void 0; exports.checkNoInvalidWrapperJars = exports.complete = exports.setup = void 0;
const core = __importStar(__nccwpck_require__(42186)); const core = __importStar(__nccwpck_require__(42186));
const exec = __importStar(__nccwpck_require__(71514)); const exec = __importStar(__nccwpck_require__(71514));
const fs = __importStar(__nccwpck_require__(57147));
const path = __importStar(__nccwpck_require__(71017)); const path = __importStar(__nccwpck_require__(71017));
const os = __importStar(__nccwpck_require__(22037)); const os = __importStar(__nccwpck_require__(22037));
const caches = __importStar(__nccwpck_require__(87504)); const caches = __importStar(__nccwpck_require__(87504));
@ -146081,7 +146086,18 @@ async function determineGradleUserHome() {
const rootDir = (0, configuration_1.getWorkspaceDirectory)(); const rootDir = (0, configuration_1.getWorkspaceDirectory)();
return path.resolve(rootDir, customGradleUserHome); return path.resolve(rootDir, customGradleUserHome);
} }
return path.resolve(await determineUserHome(), '.gradle'); const defaultGradleUserHome = path.resolve(await determineUserHome(), '.gradle');
if (fs.existsSync(defaultGradleUserHome)) {
core.info(`Gradle User Home already exists at ${defaultGradleUserHome}`);
return defaultGradleUserHome;
}
if (os.platform() === 'win32' && defaultGradleUserHome.startsWith('C:\\') && fs.existsSync('D:\\a\\')) {
const fasterGradleUserHome = 'D:\\a\\.gradle';
core.info(`Setting GRADLE_USER_HOME to ${fasterGradleUserHome} to leverage (potentially) faster drive.`);
core.exportVariable('GRADLE_USER_HOME', fasterGradleUserHome);
return fasterGradleUserHome;
}
return defaultGradleUserHome;
} }
async function determineUserHome() { async function determineUserHome() {
const output = await exec.getExecOutput('java', ['-XshowSettings:properties', '-version'], { silent: true }); const output = await exec.getExecOutput('java', ['-XshowSettings:properties', '-version'], { silent: true });

File diff suppressed because one or more lines are too long