Build outputs

This commit is contained in:
Daz DeBoer 2022-06-05 22:15:43 -06:00
parent 213bb63776
commit c34d4a9731
No known key found for this signature in database
GPG Key ID: DD6B9F0B06683D5D
4 changed files with 46 additions and 14 deletions

20
dist/main/index.js vendored
View File

@ -66383,7 +66383,7 @@ const GRADLE_USER_HOME = 'GRADLE_USER_HOME';
const CACHE_LISTENER = 'CACHE_LISTENER'; const CACHE_LISTENER = 'CACHE_LISTENER';
function setup(buildRootDirectory) { function setup(buildRootDirectory) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const gradleUserHome = determineGradleUserHome(buildRootDirectory); const gradleUserHome = yield determineGradleUserHome(buildRootDirectory);
if (process.env[GRADLE_SETUP_VAR]) { if (process.env[GRADLE_SETUP_VAR]) {
core.info('Gradle setup only performed on first gradle-build-action step in workflow.'); core.info('Gradle setup only performed on first gradle-build-action step in workflow.');
return; return;
@ -66416,11 +66416,27 @@ function complete() {
} }
exports.complete = complete; exports.complete = complete;
function determineGradleUserHome(rootDir) { function determineGradleUserHome(rootDir) {
return __awaiter(this, void 0, void 0, function* () {
const customGradleUserHome = process.env['GRADLE_USER_HOME']; const customGradleUserHome = process.env['GRADLE_USER_HOME'];
if (customGradleUserHome) { if (customGradleUserHome) {
return path.resolve(rootDir, customGradleUserHome); return path.resolve(rootDir, customGradleUserHome);
} }
return path.resolve(os.homedir(), '.gradle'); return path.resolve(yield determineUserHome(), '.gradle');
});
}
function determineUserHome() {
return __awaiter(this, void 0, void 0, function* () {
const output = yield exec.getExecOutput('java', ['-XshowSettings:properties', '-version'], { silent: true });
const regex = /user\.home = (\S*)/i;
const found = output.stderr.match(regex);
if (found == null || found.length <= 1) {
core.info('Could not determine user.home from java -version output. Using os.homedir().');
return os.homedir();
}
const userHome = found[1];
core.debug(`Determined user.home from java -version output: '${userHome}'`);
return userHome;
});
} }
function getUniqueGradleHomes(buildResults) { function getUniqueGradleHomes(buildResults) {
const gradleHomes = buildResults.map(buildResult => buildResult.gradleHomeDir); const gradleHomes = buildResults.map(buildResult => buildResult.gradleHomeDir);

File diff suppressed because one or more lines are too long

20
dist/post/index.js vendored
View File

@ -65067,7 +65067,7 @@ const GRADLE_USER_HOME = 'GRADLE_USER_HOME';
const CACHE_LISTENER = 'CACHE_LISTENER'; const CACHE_LISTENER = 'CACHE_LISTENER';
function setup(buildRootDirectory) { function setup(buildRootDirectory) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const gradleUserHome = determineGradleUserHome(buildRootDirectory); const gradleUserHome = yield determineGradleUserHome(buildRootDirectory);
if (process.env[GRADLE_SETUP_VAR]) { if (process.env[GRADLE_SETUP_VAR]) {
core.info('Gradle setup only performed on first gradle-build-action step in workflow.'); core.info('Gradle setup only performed on first gradle-build-action step in workflow.');
return; return;
@ -65100,11 +65100,27 @@ function complete() {
} }
exports.complete = complete; exports.complete = complete;
function determineGradleUserHome(rootDir) { function determineGradleUserHome(rootDir) {
return __awaiter(this, void 0, void 0, function* () {
const customGradleUserHome = process.env['GRADLE_USER_HOME']; const customGradleUserHome = process.env['GRADLE_USER_HOME'];
if (customGradleUserHome) { if (customGradleUserHome) {
return path.resolve(rootDir, customGradleUserHome); return path.resolve(rootDir, customGradleUserHome);
} }
return path.resolve(os.homedir(), '.gradle'); return path.resolve(yield determineUserHome(), '.gradle');
});
}
function determineUserHome() {
return __awaiter(this, void 0, void 0, function* () {
const output = yield exec.getExecOutput('java', ['-XshowSettings:properties', '-version'], { silent: true });
const regex = /user\.home = (\S*)/i;
const found = output.stderr.match(regex);
if (found == null || found.length <= 1) {
core.info('Could not determine user.home from java -version output. Using os.homedir().');
return os.homedir();
}
const userHome = found[1];
core.debug(`Determined user.home from java -version output: '${userHome}'`);
return userHome;
});
} }
function getUniqueGradleHomes(buildResults) { function getUniqueGradleHomes(buildResults) {
const gradleHomes = buildResults.map(buildResult => buildResult.gradleHomeDir); const gradleHomes = buildResults.map(buildResult => buildResult.gradleHomeDir);

File diff suppressed because one or more lines are too long