Skip to content

Commit

Permalink
allow to override deployment-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
MaZderMind committed Dec 20, 2016
1 parent efd0b59 commit 8f2df0a
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] 'sudo sh' << EOT
Expand Down

0 comments on commit 8f2df0a

Please sign in to comment.