diff options
-rw-r--r-- | devbot/build.py | 1 | ||||
-rw-r--r-- | devbot/state.py | 12 |
2 files changed, 11 insertions, 2 deletions
diff --git a/devbot/build.py b/devbot/build.py index 1e33c70..6a4d553 100644 --- a/devbot/build.py +++ b/devbot/build.py @@ -49,6 +49,7 @@ def build(full=False): _ccache_reset() if full or state.full_build_is_required(): + state.clean_build_state() clean() state.full_build_touch() diff --git a/devbot/state.py b/devbot/state.py index b44652f..7c2a839 100644 --- a/devbot/state.py +++ b/devbot/state.py @@ -89,13 +89,21 @@ def full_build_touch(): full_build["last"] = config.get_full_build() _save_state(_FULL_BUILD, full_build) +def clean_build_state(): + try: + for name in _BUILT_MODULES, _FULL_BUILD: + os.unlink(_get_state_path(name)) + except OSError: + pass + def clean(): _state = None print "Deleting state" + clean_build_state() + try: - for name in _BUILT_MODULES, _SYSTEM_CHECK, _FULL_BUILD: - os.unlink(_get_state_path(name)) + os.unlink(_get_state_path(_SYSTEM_CHECK)) except OSError: pass |