Skip to content

Commit 183b795

Browse files
committed
fail if the file is not signed on windows
1 parent 431dfd5 commit 183b795

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.evergreen/verify-artifacts.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ verify_using_gpg() {
3434
verify_using_powershell() {
3535
echo "Verifying $1 using powershell"
3636
powershell Get-AuthenticodeSignature -FilePath $ARTIFACTS_DIR/$1 > "$TMP_FILE" 2>&1
37+
38+
# Get-AuthenticodeSignature just outputs text, it doesn't exit with a non-zero
39+
# code if the file is not signed
40+
if grep -q NotSigned "$TMP_FILE"; then
41+
echo "File $1 is not signed"
42+
exit 1
43+
fi
3744
}
3845

3946
verify_using_codesign() {

0 commit comments

Comments
 (0)