Created
January 17, 2014 17:36
-
-
Save mtomwing/8477761 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, put, sudo, hide | |
from fabric.contrib.project import rsync_project | |
base_path = os.path.dirname(__file__) | |
env.use_ssh_config = True | |
env.hosts = ['crunchbang'] | |
def setup(): | |
put(os.path.join(base_path, 'requirements.txt'), '/tmp/requirements.txt') | |
sudo('pip install -r /tmp/requirements.txt') | |
sudo('pip install flake8') | |
# For running tests better | |
sudo('pip install nose coverage') | |
def deploy(): | |
with hide('output'): | |
rsync_project('~/', base_path) | |
def test(): | |
with cd('~/freeseer'): | |
run('flake8 src') | |
with cd('~/freeseer/src'): | |
run('DISPLAY=:0.0 coverage run setup.py test 2>&1 | grep -vi "gtk-critical" | grep -v QSqlDatabasePrivate | grep .') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment