Skip to content

Commit

Permalink
Add a publish task to the fabfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjl committed Jan 9, 2010
1 parent 4d4cd3e commit 3657e7f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fabfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
from fabric.api import *
import os
import fabric.contrib.project as project

PROD = 'sjl.webfactional.com'
DEST_PATH = '/home/sjl/webapps/slc/'
ROOT_PATH = os.path.abspath(os.path.dirname(__file__))
DEPLOY_PATH = os.path.join(ROOT_PATH, 'deploy')

def clean():
local('rm -rf ./deploy')
Expand All @@ -16,3 +23,12 @@ def reserve():

def smush():
local('smusher ./media/images')

@hosts(PROD)
def publish():
regen()
project.rsync_project(
remote_dir=DEST_PATH,
local_dir=DEPLOY_PATH.rstrip('/') + '/',
delete=True
)

0 comments on commit 3657e7f

Please sign in to comment.