aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
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