Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed logic after e2e testing #31

Merged
merged 21 commits into from
Aug 11, 2023
8 changes: 4 additions & 4 deletions dist/setup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/setup.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/sign.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/sign.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ async function setup(): Promise<void> {
const pathToTarball: string = await tc.downloadTool(downloadURL);
console.log("downloading Notation CLI completed")
const sha256 = await hash(pathToTarball);
const groundTruth = notation_url ? notation_checksum : getNotationCheckSum(version);
if (sha256 !== groundTruth) {
throw new Error(`checksum of downloaded Notation CLI ${sha256} does not match ground truth ${groundTruth}`);
const expectedCheckSum = notation_url ? notation_checksum : getNotationCheckSum(version);
if (sha256 !== expectedCheckSum) {
throw new Error(`checksum of downloaded Notation CLI ${sha256} does not match expected checksum ${expectedCheckSum}`);
}
console.log("successfully checked download checksum against ground truth")
console.log("successfully checked download checksum against expected checksum")
Two-Hearts marked this conversation as resolved.
Show resolved Hide resolved

// extract the tarball/zipball onto host runner
const extract = downloadURL.endsWith('.zip') ? tc.extractZip : tc.extractTar;
Expand Down
4 changes: 2 additions & 2 deletions src/sign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ async function setupPlugin() {
console.log("downloading signing plugin completed")
const sha256 = await hash(pathToTarball);
if (sha256 !== plugin_checksum) {
throw new Error(`checksum of downloaded plugin ${sha256} does not match ground truth ${plugin_checksum}`);
throw new Error(`checksum of downloaded plugin ${sha256} does not match expected checksum ${plugin_checksum}`);
}
console.log("successfully checked download checksum against ground truth")
console.log("successfully checked download checksum against expected checksum")
await validateDownloadPluginName(pathToTarball);
console.log("successfully validated downloaded plugin name")

Expand Down