Merge pull request #383 from colnpanic/features/notify-non-master-push

notify user when pushing to non-master branch
This commit is contained in:
rhy-jot committed 2013-12-22 14:09:08 -08:00
commit 3ee694d3ea
1 file changed
+3
+3
View File
@@ -11,6 +11,9 @@ case "$1" in
# if block if you wish to run it for others as well. # if block if you wish to run it for others as well.
if [[ $refname = "refs/heads/master" ]] ; then if [[ $refname = "refs/heads/master" ]] ; then
git archive $newrev | dokku receive $APP | sed -u "s/^/"$'\e[1G'"/" git archive $newrev | dokku receive $APP | sed -u "s/^/"$'\e[1G'"/"
else
echo $'\e[1G\e[K'"-----> WARNING: deploy did not complete, you must push to master."
echo $'\e[1G\e[K'"-----> for example, try 'git push <dokku> ${refname/refs\/heads\/}:master'"
fi fi
done done