Permalink
Browse files

updated fabfile

  • Loading branch information...
1 parent c9acc12 commit 23ae862501ce403621d6fadc5f274222f9fcc007 @toolness toolness committed Jan 25, 2012
Showing with 16 additions and 4 deletions.
  1. +16 −4 fabfile.py
View
@@ -1,9 +1,21 @@
+import os
+
from fabric.api import *
+from fabric.contrib.project import rsync_project
+
+ROOT = os.path.abspath(os.path.dirname(__file__))
-PROJ_ROOT = '~/webxray'
+def lexists(path):
+ with settings(warn_only=True):
+ return local('test -e %s' % path).succeeded
@task
def deploy():
- with cd(PROJ_ROOT):
- run('git pull')
- run('python go.py compile')
+ with lcd(ROOT):
+ if not lexists('locale'):
+ local('git clone https://github.com/hackasaurus/hackasaurus-locales.git locale')
+ local('python go.py compilemessages')
+ local('python go.py compile')
+ rsync_project(remote_dir='/var/webxray.hackasaurus.org',
+ local_dir='static-files/',
+ extra_opts='--copy-links')

0 comments on commit 23ae862

Please sign in to comment.