mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-12-26 08:42:08 -05:00
Build outputs
This commit is contained in:
parent
213bb63776
commit
c34d4a9731
4 changed files with 46 additions and 14 deletions
28
dist/main/index.js
vendored
28
dist/main/index.js
vendored
|
@ -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) {
|
||||||
const customGradleUserHome = process.env['GRADLE_USER_HOME'];
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (customGradleUserHome) {
|
const customGradleUserHome = process.env['GRADLE_USER_HOME'];
|
||||||
return path.resolve(rootDir, customGradleUserHome);
|
if (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);
|
||||||
|
|
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
28
dist/post/index.js
vendored
28
dist/post/index.js
vendored
|
@ -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) {
|
||||||
const customGradleUserHome = process.env['GRADLE_USER_HOME'];
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (customGradleUserHome) {
|
const customGradleUserHome = process.env['GRADLE_USER_HOME'];
|
||||||
return path.resolve(rootDir, customGradleUserHome);
|
if (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);
|
||||||
|
|
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue