Created
September 14, 2014 18:29
-
-
Save mtomwing/684523a7f3ea9ef705f7 to your computer and use it in GitHub Desktop.
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
import os | |
from fabric.api import env, run, cd, prefix | |
from fabric.contrib.files import exists | |
from fabric.contrib.project import rsync_project | |
env.hosts = ['10.211.55.6'] | |
def deploy(): | |
rsync_project( | |
local_dir=os.path.dirname(__file__), | |
remote_dir='.', | |
exclude='.git', | |
delete=True, | |
) | |
def setup(): | |
if not exists('~/.envs/freeseer'): | |
run('mkdir -p ~/.envs') | |
run('virtualenv ~/.envs/freeseer --system-site-packages') | |
with prefix('source ~/.envs/freeseer/bin/activate'): | |
run('pip install -r freeseer/dev_requirements.txt --upgrade') | |
def test(): | |
with cd('freeseer/src'): | |
with prefix('source ~/.envs/freeseer/bin/activate'): | |
run('DISPLAY=:0.0 python setup.py test') | |
with cd('freeseer'): | |
with prefix('source ~/.envs/freeseer/bin/activate'): | |
run('flake8 src') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment