[Tts-dev-commits] r69 - /

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Wed Jun 1 00:34:53 CEST 2011


Author: vjrj_
Date: 2011-06-01 00:34:53 +0200 (Wed, 01 Jun 2011)
New Revision: 69

Modified:
   fabfile.py
Log:


Modified: fabfile.py
===================================================================
--- fabfile.py	2011-05-31 22:23:33 UTC (rev 68)
+++ fabfile.py	2011-05-31 22:34:53 UTC (rev 69)
@@ -25,27 +25,31 @@
 def change_log():
     local("svn2cl -i  -o ChangeLog")
 
-def svn_update_dev(prefix):
+def svn_update(prefix):
     "Updates Tts-Dev website with the repository files."
     run("cd %s%s; svn up" % (prefix, home_path))
     run("cd %s%s; svn up" % (prefix, res_path))
     run("cd %s%s; svn up" % (prefix, images_path))
     run("cd %s%s; svn up" % (prefix, theme_path))
-    run("chgrp -R tts-dev %s%s" % (prefix, res_path))
-    run("chgrp -R tts-dev %s%s" % (prefix, home_path))    
-    run("chgrp -R tts-dev %s%s" % (prefix, images_path))
-    run("chgrp -R tts-dev %s%s" % (prefix, theme_path))
 
+def fix_perms(prefix, group):
+    run("chgrp -R %s %s%s" % (group, prefix, res_path))
+    run("chgrp -R %s %s%s" % (group, prefix, home_path))    
+    run("chgrp -R %s %s%s" % (group, prefix, images_path))
+    run("chgrp -R %s %s%s" % (group, theme_path))
+
 def deploy():
     run('echo Deploying with user: "%(user)s"' % env)
-    change_log()
+    # change_log()
     prepare_deploy()
-    # '/home/groups/tts-dev/htdocs/')
-    svn_update_dev(dev_prefix)
+    svn_update(dev_prefix)
+    fix_perms(dev_prefix, 'tts-dev')
 
 def deployprod():
     run('echo Deploying with user: "%(user)s"' % env)
-    change_log()
+    # change_log()
     prepare_deploy()
-    svn_update_dev(prod_prefix)
+    svn_update(prod_prefix)
+    local("echo You should do 'chmod -R www-data:www-data %s'" % (prod_prefix))
 
+




More information about the Tts-dev-commits mailing list