From 8aa0b76259be3ca8acf5ec944125cd4e047d49cd Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Fri, 8 Jan 2016 02:12:22 +0100 Subject: fabfile: Split pull and make tasks out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- fabfile.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/fabfile.py b/fabfile.py index 335105e..198947c 100644 --- a/fabfile.py +++ b/fabfile.py @@ -1,10 +1,22 @@ from fabric.api import run, cd, env, task env.hosts = ['theos.kyriasis.com'] +code_dir = 'code/website' + @task(default=True) def deploy(): - code_dir = 'code/website' - with cd(code_dir): - run("git pull") - run("make") + pull() + make() + + +@task +def pull(): + with cd(code_dir): + run("git pull") + + +@task +def make(): + with cd(code_dir): + run("make") -- cgit v1.2.3-70-g09d2