Test for release script dependency

This commit is contained in:
Klaus Hartl 2023-02-19 12:50:56 +01:00
parent b4df355506
commit 263098b1a2
No known key found for this signature in database
GPG key ID: 6BA8AED91AB6EA2A

4
run.sh
View file

@ -21,6 +21,10 @@ prep_release() {
_user "Prepare release draft on GitHub? " _user "Prepare release draft on GitHub? "
read -r answer read -r answer
if [ "$answer" = "y" ]; then if [ "$answer" = "y" ]; then
if ! command -v gh > /dev/null 2>&1; then
_fail "Script requires GitHub CLI: \`brew install gh\`"
exit 1
fi
git add --update git add --update
git commit -S -m "Prepare for $1 release" git commit -S -m "Prepare for $1 release"
git push origin main git push origin main