Created
March 9, 2021 10:52
-
-
Save AndrewVos/2fa1174f60c9faa953e0acf3ce887387 to your computer and use it in GitHub Desktop.
Script to notify you when current HEAD is deployed to Heroku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
echo "Waiting for Heroku release hash to equal HEAD..." | |
echo "Press [CTRL+C] to stop.." | |
while : | |
do | |
HEROKU_HASH=$(heroku releases | grep Deploy |head -n1 |cut -d ' ' -f4) | |
LOCAL_HASH=$(git rev-parse HEAD) | |
if [[ $LOCAL_HASH = $HEROKU_HASH* ]]; then | |
notify-send "Heroku is up to date" | |
break | |
fi | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment