diff options
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 |