Skip to content

Commit 0e9e7b4

Browse files
Plumb failCi into verification function. (#769)
1 parent 7f20bd4 commit 0e9e7b4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ try {
3535
}).on('finish', async () => {
3636
filePath.close();
3737

38-
await verify(filename, platform, uploaderVersion, verbose);
38+
await verify(filename, platform, uploaderVersion, verbose, failCi);
3939
await versionInfo(platform, uploaderVersion);
4040
await fs.chmodSync(filename, '777');
4141

src/validate.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const verify = async (
1717
platform: string,
1818
version: string,
1919
verbose: boolean,
20+
failCi: boolean,
2021
): Promise<void> => {
2122
try {
2223
const uploaderName = getUploaderName(platform);
@@ -57,7 +58,7 @@ const verify = async (
5758
verified.signatures[0].keyID.toHex(),
5859
);
5960
} else {
60-
setFailure('Codecov: Error validating SHASUM signature', true);
61+
setFailure('Codecov: Error validating SHASUM signature', failCi);
6162
}
6263

6364
const calculateHash = async (filename: string) => {
@@ -80,11 +81,11 @@ const verify = async (
8081
setFailure(
8182
'Codecov: Uploader shasum does not match -- ' +
8283
`uploader hash: ${hash}, public hash: ${shasum}`,
83-
true,
84+
failCi,
8485
);
8586
}
8687
} catch (err) {
87-
setFailure(`Codecov: Error validating uploader: ${err.message}`, true);
88+
setFailure(`Codecov: Error validating uploader: ${err.message}`, failCi);
8889
}
8990
};
9091
export default verify;

0 commit comments

Comments
 (0)