diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-05-18 16:30:10 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-05-18 16:30:10 (GMT) |
commit | a757cc5e596cf231539569ac9a7a1301602eed10 (patch) | |
tree | aeffc05abe3765de46118ed1b3a2fe17259a8c4f | |
parent | 3e79ae29a026845e1dd827f6282fb4299f1075a0 (diff) |
Improve and update repos watching
-rw-r--r-- | changesources.py | 11 | ||||
-rw-r--r-- | repos.py | 11 |
2 files changed, 12 insertions, 10 deletions
diff --git a/changesources.py b/changesources.py index 2b7fb82..fcddaec 100644 --- a/changesources.py +++ b/changesources.py @@ -16,11 +16,12 @@ def setup(c, config): if config.get("sub_repos_changes", True): for repo in repos.get_sub_repos(): - poller = GitPoller(repo.url, - project="sugar-build", - branches=[repo.branch], - pollinterval=pollinterval) - c["change_source"].append(poller) + if repo.branch: + poller = GitPoller(repo.url, + project="sugar-build", + branches=[repo.branch], + pollinterval=pollinterval) + c["change_source"].append(poller) def codebaseGenerator(change_dict): repository = change_dict["repository"] @@ -2,12 +2,13 @@ import json class Repo: - def __init__(self, name, url, branch=None): + def __init__(self, name, url, branch, tag): self.name = name self.url = url self.branch = branch + self.tag = tag - if self.branch is None: + if self.branch is None and self.tag is None: self.branch = "master" @@ -30,7 +31,7 @@ def load_modules(path): for module in json.load(open(path)): sub_repos.append(Repo(name=module["name"], url=module["repo"], - branch=module.get("branch", None))) + branch=module.get("branch", None), + tag=module.get("tag", None))) -load_modules("modules/sugar.json") -load_modules("modules/activities.json") +load_modules("build/config/dependencies.json") |