Commits

Mikhail Korobov committed f0a7933

Fix the order of actions

Comments (0)

Files changed (1)

fab_deploy/deploy.py

     make_virtualenv()
     make_clone()
     make_hgrc()
+    make_wsgi()
 
     pip_install('all')
 
-    make_wsgi()
     setup_web_server()
     update_config()
 
 
 def push(*args):
     ''' Run it instead of hg push. '''
-    allowed_args = set(['force', 'notest', 'syncdb', 'migrate', 'pip_update'])
+    allowed_args = set(['force', 'notest', 'syncdb', 'migrate', 'pip_update', 'norestart'])
     for arg in args:
         if arg not in allowed_args:
             print 'Invalid argument: %s' % arg
         if 'migrate' in args:
             migrate()
         compress()
-        touch()
+        if 'norestart' not in args:
+            touch()
 #        if 'notest' not in args:
 #            coverage()
 
 
-def update_config():
+def update_config(only_upload=False):
     upload_template('config.server.py', '%s/config.py' % env.conf['SRC_DIR'], env.conf, True)
-    touch()
+    if not only_upload:
+        touch()
 
 
 def up(branch=None):
     with cd(env.conf['SRC_BASE']):
         with cd(env.conf['INSTANCE_NAME']):
             run('hg up -C %s' % env.conf['HG_BRANCH'])
-    update_config()
+    update_config(only_upload=True)
 
 
 def make_hgrc():