From a819971c5ee0bbf236313fee746464d6d2ab8f41 Mon Sep 17 00:00:00 2001 From: Zachary Dodge Date: Mon, 9 Dec 2024 15:26:05 -0800 Subject: [PATCH 1/2] Fix publish signed commit check --- scripts/publish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish b/scripts/publish index 50310581..adbbf350 100755 --- a/scripts/publish +++ b/scripts/publish @@ -69,7 +69,7 @@ EOF verify_commit_is_signed() { local commit_hash=$(git log -1 --format="%H") - if ! git verify-commit "$commit_hash" &> /dev/null; then + if git show --no-patch --pretty=format:"%G?" "$commit_hash" | grep "R" &> /dev/null; then echo "Error! Commit $commit_hash is not signed" echo "Please follow https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account and sign your commit" exit 1 From 11111c1892177a35ba6b8e7ace34499b9ddd82b7 Mon Sep 17 00:00:00 2001 From: Zachary Dodge Date: Thu, 12 Dec 2024 10:17:25 -0800 Subject: [PATCH 2/2] Switch to N for signed commit check --- scripts/publish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish b/scripts/publish index adbbf350..5a977309 100755 --- a/scripts/publish +++ b/scripts/publish @@ -69,7 +69,7 @@ EOF verify_commit_is_signed() { local commit_hash=$(git log -1 --format="%H") - if git show --no-patch --pretty=format:"%G?" "$commit_hash" | grep "R" &> /dev/null; then + if git show --no-patch --pretty=format:"%G?" "$commit_hash" | grep "N" &> /dev/null; then echo "Error! Commit $commit_hash is not signed" echo "Please follow https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account and sign your commit" exit 1