You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
635 B
Python
22 lines
635 B
Python
from fabric.api import run, settings, cd, local, abort
|
|
from fabric.contrib.console import confirm
|
|
|
|
|
|
def deploy():
|
|
code_dir = '/tmp/blahblah'
|
|
with settings(warn_only=True):
|
|
if run("test -d %s" % code_dir).failed:
|
|
run("git clone http://github.com/smcquay/fabpreso.git {}".format(
|
|
code_dir))
|
|
with cd(code_dir):
|
|
run("git pull")
|
|
run("touch app.wsgi")
|
|
|
|
|
|
def test():
|
|
with settings(warn_only=True):
|
|
result = local('false')
|
|
if result.failed and not confirm("Tests failed. Continue anyway?"):
|
|
abort("Aborting at user request.")
|
|
local('echo ran anyway')
|