mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-07 19:47:25 +00:00
Plumb failCi into verification function. (#769)
This commit is contained in:
parent
7f20bd4c41
commit
0e9e7b4e8a
2 changed files with 5 additions and 4 deletions
|
|
@ -35,7 +35,7 @@ try {
|
|||
}).on('finish', async () => {
|
||||
filePath.close();
|
||||
|
||||
await verify(filename, platform, uploaderVersion, verbose);
|
||||
await verify(filename, platform, uploaderVersion, verbose, failCi);
|
||||
await versionInfo(platform, uploaderVersion);
|
||||
await fs.chmodSync(filename, '777');
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ const verify = async (
|
|||
platform: string,
|
||||
version: string,
|
||||
verbose: boolean,
|
||||
failCi: boolean,
|
||||
): Promise<void> => {
|
||||
try {
|
||||
const uploaderName = getUploaderName(platform);
|
||||
|
|
@ -57,7 +58,7 @@ const verify = async (
|
|||
verified.signatures[0].keyID.toHex(),
|
||||
);
|
||||
} else {
|
||||
setFailure('Codecov: Error validating SHASUM signature', true);
|
||||
setFailure('Codecov: Error validating SHASUM signature', failCi);
|
||||
}
|
||||
|
||||
const calculateHash = async (filename: string) => {
|
||||
|
|
@ -80,11 +81,11 @@ const verify = async (
|
|||
setFailure(
|
||||
'Codecov: Uploader shasum does not match -- ' +
|
||||
`uploader hash: ${hash}, public hash: ${shasum}`,
|
||||
true,
|
||||
failCi,
|
||||
);
|
||||
}
|
||||
} catch (err) {
|
||||
setFailure(`Codecov: Error validating uploader: ${err.message}`, true);
|
||||
setFailure(`Codecov: Error validating uploader: ${err.message}`, failCi);
|
||||
}
|
||||
};
|
||||
export default verify;
|
||||
|
|
|
|||
Loading…
Reference in a new issue