Created
September 26, 2012 21:29
-
-
Save mmourafiq/3790708 to your computer and use it in GitHub Desktop.
fabric
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import local | |
from fabric.api import lcd | |
def prepare_deployment(branch_name): | |
local('python manage.py test myapp') | |
local('git add -p && git commit') | |
local('git checkout master && git merge ' + branchname) | |
def deploy(): | |
with lcd('/path/to/my/prod/area/'): | |
local('git pull /my/path/to/dev/area/') | |
local('python manage.py migrate myapp') | |
local('python manage.py test myapp') | |
local('/my/command/to/restart/webserver') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment