Skip to content

Commit

Permalink
[bot] Update dist directory
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz authored and github-actions[bot] committed Aug 2, 2024
1 parent 0719002 commit fb2e693
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 74 deletions.
19 changes: 5 additions & 14 deletions dist/dependency-submission/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157632,12 +157632,9 @@ const find = __importStar(__nccwpck_require__(849));
const checksums = __importStar(__nccwpck_require__(50907));
const hash = __importStar(__nccwpck_require__(60079));
const path_1 = __nccwpck_require__(71017);
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) {
Expand Down Expand Up @@ -157670,23 +157667,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';
Expand Down Expand Up @@ -157754,16 +157745,16 @@ async function validateWrappers(config, workspaceRoot, gradleUserHome) {
const checksumCache = new cache_1.ChecksumCache(gradleUserHome);
const allowedChecksums = process.env['ALLOWED_GRADLE_WRAPPER_CHECKSUMS']?.split(',') || [];
const previouslyValidatedChecksums = checksumCache.load();
const result = await (0, validate_1.findInvalidWrapperJars)(workspaceRoot, 0, config.allowSnapshotWrappers(), allowedChecksums, previouslyValidatedChecksums);
const result = await (0, validate_1.findInvalidWrapperJars)(workspaceRoot, config.allowSnapshotWrappers(), allowedChecksums, previouslyValidatedChecksums);
if (result.isValid()) {
await core.group('All Gradle Wrapper jars are valid', async () => {
core.info(`Loaded previously validated checksums from cache: ${previouslyValidatedChecksums.join(', ')}`);
core.debug(`Loaded previously validated checksums from cache: ${previouslyValidatedChecksums.join(', ')}`);
core.info(result.toDisplayString());
});
}
else {
core.info(result.toDisplayString());
throw new errors_1.JobFailure(`Gradle Wrapper Validation Failed!\n See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#validation-failures\n${result.toDisplayString()}`);
throw new errors_1.JobFailure(`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()}`);
}
checksumCache.save(result.valid.map(wrapper => wrapper.checksum));
}
Expand Down
2 changes: 1 addition & 1 deletion dist/dependency-submission/main/index.js.map

Large diffs are not rendered by default.

19 changes: 5 additions & 14 deletions dist/dependency-submission/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111256,12 +111256,9 @@ const find = __importStar(__nccwpck_require__(849));
const checksums = __importStar(__nccwpck_require__(50907));
const hash = __importStar(__nccwpck_require__(60079));
const path_1 = __nccwpck_require__(71017);
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) {
Expand Down Expand Up @@ -111294,23 +111291,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';
Expand Down Expand Up @@ -111378,16 +111369,16 @@ async function validateWrappers(config, workspaceRoot, gradleUserHome) {
const checksumCache = new cache_1.ChecksumCache(gradleUserHome);
const allowedChecksums = process.env['ALLOWED_GRADLE_WRAPPER_CHECKSUMS']?.split(',') || [];
const previouslyValidatedChecksums = checksumCache.load();
const result = await (0, validate_1.findInvalidWrapperJars)(workspaceRoot, 0, config.allowSnapshotWrappers(), allowedChecksums, previouslyValidatedChecksums);
const result = await (0, validate_1.findInvalidWrapperJars)(workspaceRoot, config.allowSnapshotWrappers(), allowedChecksums, previouslyValidatedChecksums);
if (result.isValid()) {
await core.group('All Gradle Wrapper jars are valid', async () => {
core.info(`Loaded previously validated checksums from cache: ${previouslyValidatedChecksums.join(', ')}`);
core.debug(`Loaded previously validated checksums from cache: ${previouslyValidatedChecksums.join(', ')}`);
core.info(result.toDisplayString());
});
}
else {
core.info(result.toDisplayString());
throw new errors_1.JobFailure(`Gradle Wrapper Validation Failed!\n See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#validation-failures\n${result.toDisplayString()}`);
throw new errors_1.JobFailure(`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()}`);
}
checksumCache.save(result.valid.map(wrapper => wrapper.checksum));
}
Expand Down
2 changes: 1 addition & 1 deletion dist/dependency-submission/post/index.js.map

Large diffs are not rendered by default.

19 changes: 5 additions & 14 deletions dist/setup-gradle/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157562,12 +157562,9 @@ const find = __importStar(__nccwpck_require__(849));
const checksums = __importStar(__nccwpck_require__(50907));
const hash = __importStar(__nccwpck_require__(60079));
const path_1 = __nccwpck_require__(71017);
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) {
Expand Down Expand Up @@ -157600,23 +157597,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';
Expand Down Expand Up @@ -157684,16 +157675,16 @@ async function validateWrappers(config, workspaceRoot, gradleUserHome) {
const checksumCache = new cache_1.ChecksumCache(gradleUserHome);
const allowedChecksums = process.env['ALLOWED_GRADLE_WRAPPER_CHECKSUMS']?.split(',') || [];
const previouslyValidatedChecksums = checksumCache.load();
const result = await (0, validate_1.findInvalidWrapperJars)(workspaceRoot, 0, config.allowSnapshotWrappers(), allowedChecksums, previouslyValidatedChecksums);
const result = await (0, validate_1.findInvalidWrapperJars)(workspaceRoot, config.allowSnapshotWrappers(), allowedChecksums, previouslyValidatedChecksums);
if (result.isValid()) {
await core.group('All Gradle Wrapper jars are valid', async () => {
core.info(`Loaded previously validated checksums from cache: ${previouslyValidatedChecksums.join(', ')}`);
core.debug(`Loaded previously validated checksums from cache: ${previouslyValidatedChecksums.join(', ')}`);
core.info(result.toDisplayString());
});
}
else {
core.info(result.toDisplayString());
throw new errors_1.JobFailure(`Gradle Wrapper Validation Failed!\n See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#validation-failures\n${result.toDisplayString()}`);
throw new errors_1.JobFailure(`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()}`);
}
checksumCache.save(result.valid.map(wrapper => wrapper.checksum));
}
Expand Down
2 changes: 1 addition & 1 deletion dist/setup-gradle/main/index.js.map

Large diffs are not rendered by default.

19 changes: 5 additions & 14 deletions dist/setup-gradle/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157557,12 +157557,9 @@ const find = __importStar(__nccwpck_require__(849));
const checksums = __importStar(__nccwpck_require__(50907));
const hash = __importStar(__nccwpck_require__(60079));
const path_1 = __nccwpck_require__(71017);
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) {
Expand Down Expand Up @@ -157595,23 +157592,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';
Expand Down Expand Up @@ -157679,16 +157670,16 @@ async function validateWrappers(config, workspaceRoot, gradleUserHome) {
const checksumCache = new cache_1.ChecksumCache(gradleUserHome);
const allowedChecksums = process.env['ALLOWED_GRADLE_WRAPPER_CHECKSUMS']?.split(',') || [];
const previouslyValidatedChecksums = checksumCache.load();
const result = await (0, validate_1.findInvalidWrapperJars)(workspaceRoot, 0, config.allowSnapshotWrappers(), allowedChecksums, previouslyValidatedChecksums);
const result = await (0, validate_1.findInvalidWrapperJars)(workspaceRoot, config.allowSnapshotWrappers(), allowedChecksums, previouslyValidatedChecksums);
if (result.isValid()) {
await core.group('All Gradle Wrapper jars are valid', async () => {
core.info(`Loaded previously validated checksums from cache: ${previouslyValidatedChecksums.join(', ')}`);
core.debug(`Loaded previously validated checksums from cache: ${previouslyValidatedChecksums.join(', ')}`);
core.info(result.toDisplayString());
});
}
else {
core.info(result.toDisplayString());
throw new errors_1.JobFailure(`Gradle Wrapper Validation Failed!\n See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#validation-failures\n${result.toDisplayString()}`);
throw new errors_1.JobFailure(`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()}`);
}
checksumCache.save(result.valid.map(wrapper => wrapper.checksum));
}
Expand Down
2 changes: 1 addition & 1 deletion dist/setup-gradle/post/index.js.map

Large diffs are not rendered by default.

24 changes: 11 additions & 13 deletions dist/wrapper-validation/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('|')}`);
}
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion dist/wrapper-validation/main/index.js.map

Large diffs are not rendered by default.

0 comments on commit fb2e693

Please sign in to comment.