diff --git a/fabfile.py b/fabfile.py index 9dd3533..7143b41 100644 --- a/fabfile.py +++ b/fabfile.py @@ -8,7 +8,8 @@ env.hosts = ( def deploy(): - local('git archive --format tar.gz -o /tmp/api.tar.gz master', capture=False) + branch = local('git rev-parse --abbrev-ref HEAD', capture=True) + local('git archive --format tar.gz -o /tmp/api.tar.gz {0}'.format(branch), capture=False) put('/tmp/api.tar.gz', '/tmp/api.tar.gz') with cd('/srv/api'): run('tar xzf /tmp/api.tar.gz')