post-receive: Add support for deploying to staging server.

After this commit, we're tracking two branches: "master" and "prod".
Pushed to "prod" deploy to production, while pushes to "master" deploy
to the staging server.

(imported from commit 6ce429a1d6f606fb6136341dc393d93fd1228a21)
This commit is contained in:
Tim Abbott
2012-11-06 11:09:07 -05:00
parent 7cc630e518
commit 33b9a9e8b4
2 changed files with 8 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ if len(sys.argv) > 1:
refname = sys.argv[3]
subprocess.check_call(["git", "fetch"], stdout=open('/dev/null', 'w'))
subprocess.check_call(["git", "reset", "--hard", "origin/master"], stdout=open('/dev/null', 'w'))
subprocess.check_call(["git", "reset", "--hard", refname], stdout=open('/dev/null', 'w'))
#subprocess.check_call(["python", "manage.py", "syncdb"], stdout=open('/dev/null', 'w'))
# Restart the FastCGI process, which is running in a shell loop in screen.