From: bobcall Date: Mon, 15 Jul 2013 18:44:43 +0000 (-0400) Subject: More silly changes X-Git-Tag: release-20150131~386^2~104^2~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b039b81e13e54c48e608a06c6c9374eb9f75acd4;p=oweals%2Fkarmaworld.git More silly changes --- diff --git a/fabfile.py b/fabfile.py index 105e38d..22fcf52 100644 --- a/fabfile.py +++ b/fabfile.py @@ -17,14 +17,17 @@ def here(): """ Connection information for the local machine """ + def _custom_local(command): + prefixed_command = '/bin/bash -l -i -c "%s"' % command + return local(prefixed_command) + env.run = _custom_local # This is required for the same reason as above env.proj_root = '/var/www/karmaworld' env.cd = lcd env.reqs = 'reqs/dev.txt' - env.confs = 'confs/%s' % env.branch + env.confs = 'confs/beta' env.branch = 'beta' - env.run = virtenv_exec @@ -75,17 +78,17 @@ def syncdb(): Sync Database """ - env.run('%s/manage.py syncdb --migrate' % env.proj_dir ) + env.run('%s/manage.py syncdb --migrate' % env.proj_root ) ####### Collect Static Files @task def collect_static(): """ - Collect static files (if AWS config. present, push to S3 + Collect static files (if AWS config. present, push to S3) """ - env.run('%s/manage.py collectstatic --noinput' % env.proj_dir ) + env.run('%s/manage.py collectstatic --noinput' % env.proj_root ) ####### Run Dev Server @task @@ -94,7 +97,7 @@ def dev_server(): Runs the built-in django webserver """ - env.run('%s/manage.py runserver' % env.proj_dir ) + env.run('%s/manage.py runserver' % env.proj_root) ####### Create Virtual Environment @task @@ -104,7 +107,7 @@ def make_virtualenv(): """ run('virtualenv %s/%s' % (env.proj_root, env.branch)) - env.run('pip install -r %s/reqs/%s.txt' % (env.proj_dir, env.branch) ) + env.run('pip install -r %s/reqs/%s.txt' % (env.proj_root, env.branch) ) @task def start_supervisord(): @@ -199,7 +202,7 @@ def update_reqs(): ####### Pull new code @task def update_code(): - env.run('cd %s; git pull' % env.proj_dir) + env.run('cd %s; git pull' % env.proj_root ) @task def backup(): @@ -230,4 +233,3 @@ def deploy(): collect_static() restart_supervisord() ########## END COMMANDS - sethwoodworth started a discussion in the diff 6 days ago