mirror of
https://github.com/gradle/actions.git
synced 2026-03-23 04:25:46 +08:00
build
This commit is contained in:
@@ -22,21 +22,24 @@ const string_argv_1 = require("string-argv");
|
||||
const execution = __importStar(require("./execution"));
|
||||
const gradlew = __importStar(require("./gradlew"));
|
||||
const provision = __importStar(require("./provision"));
|
||||
// Invoked by Github Actions
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const baseDirectory = process.env[`GITHUB_WORKSPACE`] || "";
|
||||
let result = yield execution.execute(yield resolveGradleExecutable(baseDirectory), resolveBuildRootDirectory(baseDirectory), parseCommandLineArguments());
|
||||
if (result.buildScanUrl != null) {
|
||||
if (result.buildScanUrl) {
|
||||
core.setOutput("build-scan-url", result.buildScanUrl);
|
||||
}
|
||||
if (result.status != 0) {
|
||||
core.setFailed(`Gradle process exited with status ${result.status}`);
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.run = run;
|
||||
run();
|
||||
function resolveGradleExecutable(baseDirectory) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
|
||||
Reference in New Issue
Block a user