Created
March 3, 2016 12:21
-
-
Save cakuki/f7f2ce51a120fa706d88 to your computer and use it in GitHub Desktop.
Waiting for branch CI status success
This file contains 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
#!/usr/bin/env bash | |
function waitci { | |
branch=${1:-"$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')"} | |
echo -n "Checking $branch branch..." | |
while :; | |
do cistatus=$(git ci-status $branch) | |
if [ "$cistatus" = "success" ] | |
then | |
echo "\nSuccess in $(date "+%Y-%m-%d %H:%M:%S")" | |
break | |
else | |
echo -n "." | |
fi | |
sleep 10 | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment