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
#!/bin/sh | |
###################################################### | |
# Deploys working repository to git deployment branch | |
###################################################### | |
#get the status of the working repository | |
status=`git status --porcelain` | |
#check if the working repository is clean | |
if [ "$status" = "" ] | |
then | |
echo `git branch -f deployment` | |
echo `git push origin deployment` | |
echo "OK. Done deploying to git deployment branch." | |
exit 0 #success | |
else | |
echo `git status` | |
echo "Error. Working repository is not clean. Commit your changes..." | |
exit 1 #failure | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment