mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-22 09:02:50 +00:00
parent
ee54c1fd71
commit
f3e4903860
6 changed files with 58 additions and 22 deletions
17
dist/main/index.js
vendored
17
dist/main/index.js
vendored
|
@ -65988,6 +65988,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
|
@ -65998,6 +66007,7 @@ const fs_1 = __importDefault(__nccwpck_require__(7147));
|
|||
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||
const cache_reporting_1 = __nccwpck_require__(6674);
|
||||
function writeJobSummary(buildResults, cacheListener) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.info('Writing job summary');
|
||||
if (buildResults.length === 0) {
|
||||
core.debug('No Gradle build results found. Summary table will not be generated.');
|
||||
|
@ -66006,7 +66016,8 @@ function writeJobSummary(buildResults, cacheListener) {
|
|||
writeSummaryTable(buildResults);
|
||||
}
|
||||
(0, cache_reporting_1.logCachingReport)(cacheListener);
|
||||
core.summary.write();
|
||||
yield core.summary.write();
|
||||
});
|
||||
}
|
||||
exports.writeJobSummary = writeJobSummary;
|
||||
function loadBuildResults() {
|
||||
|
@ -66392,6 +66403,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||
exports.complete = exports.setup = void 0;
|
||||
const core = __importStar(__nccwpck_require__(2186));
|
||||
const exec = __importStar(__nccwpck_require__(1514));
|
||||
const summary_1 = __nccwpck_require__(1327);
|
||||
const fs = __importStar(__nccwpck_require__(7147));
|
||||
const path = __importStar(__nccwpck_require__(1017));
|
||||
const os = __importStar(__nccwpck_require__(2037));
|
||||
|
@ -66403,6 +66415,9 @@ const GRADLE_USER_HOME = 'GRADLE_USER_HOME';
|
|||
const CACHE_LISTENER = 'CACHE_LISTENER';
|
||||
const JOB_SUMMARY_ENABLED_PARAMETER = 'generate-job-summary';
|
||||
function shouldGenerateJobSummary() {
|
||||
if (!process.env[summary_1.SUMMARY_ENV_VAR]) {
|
||||
return false;
|
||||
}
|
||||
return core.getBooleanInput(JOB_SUMMARY_ENABLED_PARAMETER);
|
||||
}
|
||||
function setup(buildRootDirectory) {
|
||||
|
|
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
17
dist/post/index.js
vendored
17
dist/post/index.js
vendored
|
@ -64908,6 +64908,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
|
@ -64918,6 +64927,7 @@ const fs_1 = __importDefault(__nccwpck_require__(7147));
|
|||
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||
const cache_reporting_1 = __nccwpck_require__(6674);
|
||||
function writeJobSummary(buildResults, cacheListener) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.info('Writing job summary');
|
||||
if (buildResults.length === 0) {
|
||||
core.debug('No Gradle build results found. Summary table will not be generated.');
|
||||
|
@ -64926,7 +64936,8 @@ function writeJobSummary(buildResults, cacheListener) {
|
|||
writeSummaryTable(buildResults);
|
||||
}
|
||||
(0, cache_reporting_1.logCachingReport)(cacheListener);
|
||||
core.summary.write();
|
||||
yield core.summary.write();
|
||||
});
|
||||
}
|
||||
exports.writeJobSummary = writeJobSummary;
|
||||
function loadBuildResults() {
|
||||
|
@ -65076,6 +65087,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||
exports.complete = exports.setup = void 0;
|
||||
const core = __importStar(__nccwpck_require__(2186));
|
||||
const exec = __importStar(__nccwpck_require__(1514));
|
||||
const summary_1 = __nccwpck_require__(1327);
|
||||
const fs = __importStar(__nccwpck_require__(7147));
|
||||
const path = __importStar(__nccwpck_require__(1017));
|
||||
const os = __importStar(__nccwpck_require__(2037));
|
||||
|
@ -65087,6 +65099,9 @@ const GRADLE_USER_HOME = 'GRADLE_USER_HOME';
|
|||
const CACHE_LISTENER = 'CACHE_LISTENER';
|
||||
const JOB_SUMMARY_ENABLED_PARAMETER = 'generate-job-summary';
|
||||
function shouldGenerateJobSummary() {
|
||||
if (!process.env[summary_1.SUMMARY_ENV_VAR]) {
|
||||
return false;
|
||||
}
|
||||
return core.getBooleanInput(JOB_SUMMARY_ENABLED_PARAMETER);
|
||||
}
|
||||
function setup(buildRootDirectory) {
|
||||
|
|
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
|
@ -13,7 +13,7 @@ export interface BuildResult {
|
|||
get buildScanUri(): string
|
||||
}
|
||||
|
||||
export function writeJobSummary(buildResults: BuildResult[], cacheListener: CacheListener): void {
|
||||
export async function writeJobSummary(buildResults: BuildResult[], cacheListener: CacheListener): Promise<void> {
|
||||
core.info('Writing job summary')
|
||||
|
||||
if (buildResults.length === 0) {
|
||||
|
@ -24,7 +24,7 @@ export function writeJobSummary(buildResults: BuildResult[], cacheListener: Cach
|
|||
|
||||
logCachingReport(cacheListener)
|
||||
|
||||
core.summary.write()
|
||||
await core.summary.write()
|
||||
}
|
||||
|
||||
export function loadBuildResults(): BuildResult[] {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import * as core from '@actions/core'
|
||||
import * as exec from '@actions/exec'
|
||||
import {SUMMARY_ENV_VAR} from '@actions/core/lib/summary'
|
||||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
import * as os from 'os'
|
||||
|
@ -14,6 +15,11 @@ const CACHE_LISTENER = 'CACHE_LISTENER'
|
|||
const JOB_SUMMARY_ENABLED_PARAMETER = 'generate-job-summary'
|
||||
|
||||
function shouldGenerateJobSummary(): boolean {
|
||||
// Check if Job Summary is supported on this platform
|
||||
if (!process.env[SUMMARY_ENV_VAR]) {
|
||||
return false
|
||||
}
|
||||
|
||||
return core.getBooleanInput(JOB_SUMMARY_ENABLED_PARAMETER)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue