diff options
author | MaZderMind | 2016-12-20 22:30:58 +0100 |
---|---|---|
committer | MaZderMind | 2016-12-20 22:30:58 +0100 |
commit | 8f2df0a5b85fb8947999aad27fb98cd1392e1ef0 (patch) | |
tree | 522dcc51c8a309ebc81921134c3de3331813b86f /deploy.sh | |
parent | efd0b59f8ed363e12211894d8892e4d18b198c04 (diff) |
allow to override deployment-checks
Diffstat (limited to 'deploy.sh')
-rwxr-xr-x | deploy.sh | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -10,14 +10,22 @@ if [ $? -ne 0 ]; then exit 1 fi -if [ `git rev-parse --verify origin/master` != `git rev-parse --verify master` ]; then - echo "You have commits on the master branch not pushed to origin yet. They would not be deployed. aborting" - exit 2 +if [ `git rev-parse --verify origin/$DEPLOY_BRANCH` != `git rev-parse --verify $DEPLOY_BRANCH` ]; then + echo "You have commits on the master branch not pushed to origin yet. They would not be deployed." + echo "do you still which to deploy what's already in the repo? then type yes" + read -p "" input + if [ "x$input" != "xyes" ]; then + exit 2 + fi fi if ! (git diff --exit-code >/dev/null || git diff --cached --exit-code >/dev/null); then - echo "You have uncomitted changes. They would not be deployed. aborting" - exit 2 + echo "You have uncomitted changes. They would not be deployed." + echo "do you still which to deploy what's already in the repo? then type yes" + read -p "" input + if [ "x$input" != "xyes" ]; then + exit 2 + fi fi ssh -A voc@lb.dus.c3voc.de 'sudo sh' << EOT |