Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (24 sloc) 1021 Bytes
# Fabric for deploying the spritecow app
import os
import datetime
import ConfigParser
from fabric.colors import yellow
from fabric.api import local, env
PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__))
here = lambda *x: os.path.join(PROJECT_ROOT, *x)
config = ConfigParser.ConfigParser()
env.bucket = config.get('production', 'bucket')
env.git_url = config.get('production', 'git_url')
env.access_key = config.get('production', 'access_key')
env.secret_key = config.get('production', 'secret_key')
tmp_time =
env.time = tmp_time.strftime("%Y%m%d_%H%M%S")
env.clone_path = here('tmp', env.time )
env.htdocs = here('tmp', env.time, 'www')
def deploy():
"""Deployment actions into S3 using s3put"""
local('mkdir -p %(clone_path)s' % env)
local('git clone %(git_url)s %(clone_path)s' % env)
local('./ -a %(access_key)s -s %(secret_key)s -b %(bucket)s -p %(htdocs)s -g public-read %(htdocs)s' % env)
print yellow("Done?")
Something went wrong with that request. Please try again.