Skip to content
Snippets Groups Projects
Commit 4ebe8221 authored by Dan Braghis's avatar Dan Braghis
Browse files

Allow custom branch in deploy

parent d353da02
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ def pull_production_media(): ...@@ -49,7 +49,7 @@ def pull_production_media():
@roles('staging') @roles('staging')
def deploy_staging(): def deploy_staging():
_build_static() _build_static(build_branch='staging')
_deploy_static() _deploy_static()
run('git pull') run('git pull')
...@@ -153,9 +153,8 @@ def _post_deploy(): ...@@ -153,9 +153,8 @@ def _post_deploy():
@runs_once @runs_once
def _build_static(): def _build_static(build_branch='master'):
# Build a specific branch # Build a specific branch
build_branch = 'master'
current_branch = local('git rev-parse --abbrev-ref HEAD', capture=True) current_branch = local('git rev-parse --abbrev-ref HEAD', capture=True)
if current_branch != build_branch: if current_branch != build_branch:
raise RuntimeError("Please switch to '{}' before deploying".format(build_branch)) raise RuntimeError("Please switch to '{}' before deploying".format(build_branch))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment