added more complex stuff
This commit is contained in:
parent
db35fe92e0
commit
3beaa660d7
21
interactivity.py
Normal file
21
interactivity.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
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')
|
Loading…
Reference in New Issue
Block a user