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

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 {}".format(
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')