From: bobcall Date: Sat, 29 Jun 2013 11:08:31 +0000 (-0400) Subject: Added remote support and the ability to pull code X-Git-Tag: release-20150131~386^2~104^2~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8e5f42816d480038e065b7be3d649e1b506b31a8;p=oweals%2Fkarmaworld.git Added remote support and the ability to pull code --- diff --git a/fabfile.py b/fabfile.py index 95e6bd1..937fef7 100644 --- a/fabfile.py +++ b/fabfile.py @@ -27,6 +27,17 @@ Connection information for the local machine env.branch = 'beta' env.run = virtenv_exec +@task +def prod(): + env.user = 'djkarma' + env.hosts = ['beta.karmanotes.org'] + env.proj_root = '/var/www/karmaworld' + env.proj_dir = '/var/www/karmaworld' + env.reqs = 'reqs/prod.txt' + env.confs = 'confs/beta/' + env.branch = 'beta' + env.run = virtenv_exec + ######## Run Commands in Virutal Environment def virtenv_exec(command): with virtualenv('%s/%s' % (env.proj_dir, env.branch)): @@ -62,3 +73,6 @@ def start_supervisord(): config_file = '%s/%ssupervisord.conf' % (env.proj_dir,env.confs) env.run('supervisord -c %s' % config_file) +@task +def update_code(): + env.run('cd %s; git pull' % env.proj_dir)