fabfile.py @ cb8b12793ae4

Add an MIT/X11 LICENSE file.
author Steve Losh <steve@stevelosh.com>
date Sat, 09 Jan 2010 04:16:02 -0500
parents c256da53789f
children 08d7552b6237
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')

def regen():
    clean()
    local('hyde -g -s .')

def serve():
    local('hyde -w -s .')

def reserve():
    regen()
    serve()

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
    )