|
|
|
@ -23,11 +23,11 @@ fi
|
|
|
|
|
|
|
|
|
|
# TODO: When deployment is new enough, use the top command.
|
|
|
|
|
#currentbranch="$(git branch --show-current)"
|
|
|
|
|
currentbranch="$(git branch --format '%(refname:short)')"
|
|
|
|
|
currentbranch="$(git rev-parse --abbrev-ref HEAD)"
|
|
|
|
|
|
|
|
|
|
# If we are not on target branch, switch and run again
|
|
|
|
|
if test "$currentbranch" '!=' "$branch"; then
|
|
|
|
|
exec /bin/sh -eu -c "git checkout $branch && exec $0"
|
|
|
|
|
exec /bin/sh -eu -c "git checkout $branch && exec $0 $branch"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Deploying branch $branch"
|
|
|
|
|