forked from voc/streaming-website
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efd0b59
commit 8f2df0a
Showing
1 changed file
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|