diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-16 16:53:36 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-16 16:53:36 (GMT) |
commit | 39f3d8a9428e031c4bdb0cc9a26f2fb1df9a7520 (patch) | |
tree | 7947f1413318b4379bae8e6c28fc92e61d38d3ee /devbot/config.py | |
parent | c6206d0f80d5961b5d52a5b03765acdad2c22f7e (diff) |
Add a distribute command
It builds and uploads releases.
Diffstat (limited to 'devbot/config.py')
-rw-r--r-- | devbot/config.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/devbot/config.py b/devbot/config.py index 2f9999c..93c82f7 100644 --- a/devbot/config.py +++ b/devbot/config.py @@ -38,6 +38,7 @@ class Module: self.options = info.get("options", []) self.options_evaluated = info.get("options_evaluated", []) self.has_tests = info.get("has_tests", False) + self.distribute = info.get("distribute", False) if get_pref("BUILD_IN_SOURCE"): self.out_of_source = False @@ -50,7 +51,7 @@ class Module: def get_build_dir(self): return os.path.join(get_build_dir(), self.name) - def get_commit_id(self): + def get_commit_id(self, tag="HEAD"): if not os.path.exists(self.get_source_dir()): return None @@ -61,6 +62,17 @@ class Module: remote=self.repo, branch=self.branch, tag=self.tag, retry=10) + def get_build_system(self): + source_dir = self.get_source_dir() + if os.path.exists(os.path.join(source_dir, "setup.py")): + return "activity" + elif os.path.exists(os.path.join(source_dir, "autogen.sh")): + return "autotools" + else: + print "The source directory has unexpected content, please " \ + "delete it and pull\nthe source again." + return None + def _ensure_dir(dir): if not os.path.exists(dir): os.mkdir(dir) |