[bot] Update dist directory

This commit is contained in:
bigdaz
2024-08-02 21:57:19 +00:00
committed by github-actions[bot]
parent 07190022f8
commit fb2e6938b6
10 changed files with 36 additions and 74 deletions

View File

@@ -100928,12 +100928,19 @@ async function run() {
(0, deprecation_collector_1.failOnUseOfRemovedFeature)('The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation`');
}
(0, configuration_1.setActionId)('gradle/actions/wrapper-validation');
const result = await validate.findInvalidWrapperJars(path.resolve('.'), +core.getInput('min-wrapper-count'), core.getInput('allow-snapshots') === 'true', core.getInput('allow-checksums').split(','));
const result = await validate.findInvalidWrapperJars(path.resolve('.'), core.getInput('allow-snapshots') === 'true', core.getInput('allow-checksums').split(','));
if (result.isValid()) {
core.info(result.toDisplayString());
const minWrapperCount = +core.getInput('min-wrapper-count');
if (result.valid.length < minWrapperCount) {
const message = result.valid.length === 0
? 'Wrapper validation failed: no Gradle Wrapper jars found. Did you forget to checkout the repository?'
: `Wrapper validation failed: expected at least ${minWrapperCount} Gradle Wrapper jars, but found ${result.valid.length}.`;
core.setFailed(message);
}
}
else {
core.setFailed(`Gradle Wrapper Validation Failed!\n See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#reporting-failures\n${result.toDisplayString()}`);
core.setFailed(`At least one Gradle Wrapper Jar failed validation!\n See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#validation-failures\n${result.toDisplayString()}`);
if (result.invalid.length > 0) {
core.setOutput('failed-wrapper', `${result.invalid.map(w => w.path).join('|')}`);
}
@@ -101770,12 +101777,9 @@ const find = __importStar(__nccwpck_require__(849));
const checksums = __importStar(__nccwpck_require__(907));
const hash = __importStar(__nccwpck_require__(79));
const path_1 = __nccwpck_require__(1017);
async function findInvalidWrapperJars(gitRepoRoot, minWrapperCount, allowSnapshots, allowedChecksums, previouslyValidatedChecksums = [], knownValidChecksums = checksums.KNOWN_CHECKSUMS) {
async function findInvalidWrapperJars(gitRepoRoot, allowSnapshots, allowedChecksums, previouslyValidatedChecksums = [], knownValidChecksums = checksums.KNOWN_CHECKSUMS) {
const wrapperJars = await find.findWrapperJars(gitRepoRoot);
const result = new ValidationResult([], []);
if (wrapperJars.length < minWrapperCount) {
result.errors.push(`Expected to find at least ${minWrapperCount} Gradle Wrapper JARs but got only ${wrapperJars.length}`);
}
if (wrapperJars.length > 0) {
const notYetValidatedWrappers = [];
for (const wrapperJar of wrapperJars) {
@@ -101808,23 +101812,17 @@ exports.findInvalidWrapperJars = findInvalidWrapperJars;
class ValidationResult {
constructor(valid, invalid) {
this.fetchedChecksums = false;
this.errors = [];
this.valid = valid;
this.invalid = invalid;
}
isValid() {
return this.invalid.length === 0 && this.errors.length === 0;
return this.invalid.length === 0;
}
toDisplayString() {
let displayString = '';
if (this.invalid.length > 0) {
displayString += `✗ Found unknown Gradle Wrapper JAR files:\n${ValidationResult.toDisplayList(this.invalid)}`;
}
if (this.errors.length > 0) {
if (displayString.length > 0)
displayString += '\n';
displayString += `✗ Other validation errors:\n ${this.errors.join(`\n `)}`;
}
if (this.valid.length > 0) {
if (displayString.length > 0)
displayString += '\n';

File diff suppressed because one or more lines are too long