Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: next
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (16 sloc) 0.544 kb
from fabric.api import local, env
env.git_remote = 'dev'
def prod():
env.git_remote = 'prod'
def heroku(cmd):
local("heroku run '{0}' --remote {1}".format(cmd, env.git_remote))
def heroku_django(cmd):
heroku("python manage.py {0}".format(cmd))
def deploy():
remote = ('prod master' if env.git_remote == 'prod'
else 'dev next:master')
local('git push ' + remote)
heroku_django('collectstatic --noinput')
heroku_django('syncdb')
if env.git_remote == 'dev':
heroku_django('migrate')
Jump to Line
Something went wrong with that request. Please try again.