diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-28 21:59:21 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-28 21:59:21 (GMT) |
commit | ff8370dc4d0d57f24b7b68bbe582d2dbbf76eda6 (patch) | |
tree | 155106afff67b6cc1dd6a1c64f7eb6c5b1a4e9ab /devbot | |
parent | c3a37eaf4f75e9f6e072121cc237a57d8605a6e3 (diff) |
Add a run_build function to main
This avoids duplication and circular deps
Diffstat (limited to 'devbot')
-rw-r--r-- | devbot/build.py | 6 | ||||
-rw-r--r-- | devbot/main.py | 19 |
2 files changed, 19 insertions, 6 deletions
diff --git a/devbot/build.py b/devbot/build.py index d2be575..1e69e7d 100644 --- a/devbot/build.py +++ b/devbot/build.py @@ -52,12 +52,6 @@ def pull(lazy=False): def build(full=False): - if full or state.full_build_is_required(): - from devbot import clean - clean.clean(build_only=True) - - state.full_build_touch() - to_build = [] for module in config.load_modules(): if not state.built_module_is_unchanged(module): diff --git a/devbot/main.py b/devbot/main.py index 3e14a72..c368ca7 100644 --- a/devbot/main.py +++ b/devbot/main.py @@ -4,6 +4,25 @@ import imp from devbot import config from devbot import environ from devbot import plugins +from devbot import system +from devbot import build +from devbot import state +from devbot import clean + +def run_build(full=False): + if full or state.full_build_is_required(): + clean.clean(build_only=True) + + state.full_build_touch() + + if not system.check(lazy=True): + return False + + if not build.pull(lazy=True): + return False + + if not build.build(full=False): + return False def load_plugins(): |