"""Get the version of a given package at a particular ref."""
return getChangelog(package, ref).get_version()
+def pocketExists(pocket, repo):
+ branch = pocketToGit(pocket)
+ try:
+ c.captureOutput(['git', 'rev-parse', branch], cwd=repo)
+ except subprocess.CalledProcessError:
+ return False
+ return True
def validateBuild(pocket, package, commit):
"""Given the parameters of a new build, validate that build.
(new_version, package, p, current_commit))
if not config.build.pockets[pocket].get('allow_backtracking', False):
+ if not pocketExists(pocket, package_repo):
+ return True
+
branch = pocketToGit(pocket)
current_version = getVersion(package, branch)
if new_version <= current_version: