Commits

Michael Shepanski committed 2bb1426

Cleanup fabfile; minor css changes

Comments (0)

Files changed (3)

 Deploy code from the BitBucket repo on the production server.
 """
 import os
-from fabric.api import *
-from fabric.contrib.files import *
+from fabric.api import cd, env, run, sudo
+from fabric.contrib.project import rsync_project
+
+RSYNC_EXCLUDE = ('.DS_Store', '.hg', '*.pyc', '*.example', '*.db', 'fabfile.py', "collectstatic")
 
 env.hosts = ["pushingkarma.com"]
 env.directory = '/home/mjs7231/Projects/pushingkarma'
     run('rm -rf %s/collectstatic' % env.directory)
     virtualenv('%s/manage.py collectstatic -l --noinput --verbosity=0' % env.directory)
 
-def copy_secrets():
-    """ Copy the settings.secrets.py to production. """
-    secrets_local = "%s/settings/secrets.py" % os.path.dirname(__file__)
-    secrets_remote = "%s/settings/secrets.py" % env.directory
-    put(secrets_local, secrets_remote)
+def copy_source():
+    """ Copy project source files from local. """
+    # Default rsync options: -pthrvz
+    remote_dir = os.path.dirname(env.directory)
+    rsync_project(remote_dir, exclude=RSYNC_EXCLUDE, delete=True, extra_opts="--links --omit-dir-times")
 
 def reload_apache():
     """ Reload the apache server. """
 def deploy():
     """ Deploy to the production server. """
     check_privatemount()
-    update_source()
+    copy_source()
     update_jquery_wysiwym()
     update_pip()
-    copy_secrets()
     collectstatic()
     reload_apache()

themes/v2-hardwood/static/css/variables.less

 // PushingKarma - Variables (Override default variables when desired)
 //------------------------------------------------------------------------
 
-
 // Fonts & Colors
 @sansFontFamily:    "Helvetica Neue", Helvetica, Arial, sans-serif;
 @serifFontFamily:   Georgia, "Times New Roman", Times, serif;
 @baseFontFamily:    @serifFontFamily;
 @navbarFontFamily:  kabelbook, georgia, serif, arial;
 
-
 @contentBackground: #dcd7c4;
 @btnPrimaryBackground: #57a;
 @btnPrimaryBackgroundHighlight: #236;
 
-
 // Images
 @imageRoot: "/collectstatic/img";
 @iconSpritePath: "../shared/bootstrap/glyphicons-halflings.png";

themes/v2-hardwood/static/css/wysiwym.less

 
   .btn-group {
     margin-bottom: 2px;
-
     [class^="icon-"], [class*=" icon-"] {
       background-image: url("../shared/wysiwym/wysiwym/buttons.dark.png");
       line-height: 14px;
       opacity: 0.9;
     }
-
     .text { display: none; }
     .btn { height: 14px; line-height: 14px; }
     .icon-bold { background-position: -5px -5px; }