Compare commits

...

6 Commits

Author SHA1 Message Date
LEdoian af9896c95f Use modern syntax for SSL in nginx config
My nginx told me that the old one is deprecated.
3 years ago
LEdoian 0214fc0c87 Do not forget to pull the new deploy script 3 years ago
LEdoian 167d7d6059 Use right command for determining current branch 3 years ago
LEdoian 606c8137a9 Add forgotten parameter in recursive call 3 years ago
LEdoian ebc772b7ed Add forgotten flag to deploy script
I should maybe write tests for even that?
3 years ago
LEdoian 3fc9805219 Fix comparison in deploy.sh
This is not perl, so -ne does _arithmetic_ comparison, not string. And
since that is in an if, it does not break the script…
3 years ago

@ -1,5 +1,5 @@
server {
ssl on;
listen ssl;
TODO: gzip?
# TODO FOR ADMIN: Config listens and SSL and server_name and whatnot

@ -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" -ne "$branch"; then
exec /bin/sh -eu "git checkout $branch && exec $0"
if test "$currentbranch" '!=' "$branch"; then
exec /bin/sh -eu -c "git checkout $branch && git pull && exec $0 $branch"
fi
echo "Deploying branch $branch"

Loading…
Cancel
Save