Closed pololi-stripe closed 1 year ago
verify_commit_is_signed
functionI added a tmp.sh
verify_commit_is_signed() {
local commit_hash=$(git log -1 --format="%H")
if ! git verify-commit "$commit_hash" &> /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
fi
}
verify_commit_is_signed
echo "latest commit is signed!"
echo ""
verify_commit_is_signed_foo() {
local commit_hash="c5d1ef34dc452ac8c8f61e2b3685ff781da8fbdc"
if ! git verify-commit "$commit_hash" &> /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
fi
}
verify_commit_is_signed_foo
and ran it
~/stripe-oss/stripe-js
> ./tmp.sh
latest commit is signed!
Error! Commit c5d1ef34dc452ac8c8f61e2b3685ff781da8fbdc is not signed
Please follow https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account and sign your commit
Summary & motivation
update publish script
API review
Copy [this template] or link to an API review issue.
[this template]: https://github.com/stripe/react-stripe-js/tree/master/.github/API_REVIEW.md
Testing & documentation