Add error case for TAG_NAME==null

This commit is contained in:
David Dworken 2022-05-23 08:48:22 -07:00
parent cb72e0a830
commit e8c8d4f0ad

View File

@ -17,6 +17,11 @@ jobs:
run: |
brew install md5sha1sum
export TAG_NAME=`curl -L https://api.github.com/repos/ddworken/hishtory/releases/latest | jq -r .tag_name`
if [ $TAG_NAME == "null" ]; then
echo "$TAG_NAME is null, this shouldn't happen!"
curl -L https://api.github.com/repos/ddworken/hishtory/releases/latest
exit 1
fi
echo "Signing binaries for $TAG_NAME"
curl -L -o hishtory-darwin-arm64 https://github.com/ddworken/hishtory/releases/download/$TAG_NAME-darwin-arm64/hishtory-darwin-arm64
curl -L -o hishtory-darwin-amd64 https://github.com/ddworken/hishtory/releases/download/$TAG_NAME-darwin-amd64/hishtory-darwin-amd64