aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
authorMaZderMind2016-12-20 22:30:58 +0100
committerMaZderMind2016-12-20 22:30:58 +0100
commit8f2df0a5b85fb8947999aad27fb98cd1392e1ef0 (patch)
tree522dcc51c8a309ebc81921134c3de3331813b86f /deploy.sh
parentefd0b59f8ed363e12211894d8892e4d18b198c04 (diff)
allow to override deployment-checks
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/deploy.sh b/deploy.sh
index 5f409a8..4a61dac 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -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