Skip to content

Instantly share code, notes, and snippets.

@oleiade
Created May 31, 2012 14:32
Show Gist options
  • Save oleiade/2843778 to your computer and use it in GitHub Desktop.
Save oleiade/2843778 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# -*- coding : utf-8 -*-
from __future__ import with_statement
import os
from fabric.api import *
from fabric.contrib.files import exists
env.hosts = ['axiom.sem.io']
env.project_name = 'axiom'
env.root = '/home/axiom'
env.releases = '/home/axiom/releases'
env.activate = 'source %s ;' % '/home/axiom/test/.env/bin/activate'
env.pypi = 'http://pypi.sem.io'
@task
def development():
env.root = '/home/axiom/test'
@task
def production():
env.root = '/home/axiom/Prod'
@task
def pack():
# create a new source distribution as tarball
local('python setup.py sdist --formats=gztar', capture=False)
@task
def upload():
local('python setup.py register -r local sdist upload -r local')
@task
def deploy(install_data=True):
with cd(env.root):
run(env.activate + 'pip install axiom'
' --index-url http://pypi.sem.io'
' --install-option="--install-data"'
' -v')
@task
def rollback(version):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment