accept tag also when doing a single build

A single build with the prefer-new option will be possible when an information
about the tag will be provided.
This commit is contained in:
Dan Horák 2013-01-10 13:47:40 +01:00 committed by Dennis Gilmore
parent cdfae9fe86
commit 61d7790601

View file

@ -1259,15 +1259,21 @@ class BuildTracker(object):
def main(args):
tracker = BuildTracker()
#binfo = remote.getBuild(args[0], strict=True)
#tracker.scanBuild(binfo['id'])
tag=None
try:
tag = args[0]
except IndexError:
tag = None
if options.build:
binfo = remote.getBuild(options.build, strict=True)
tracker.scanBuild(binfo['id'])
tracker.scanBuild(binfo['id'], tag=tag)
else:
tag = args[0]
tracker.scanTag(tag)
if tag is None:
print "Tag is required"
return
else:
print "Working on tag %s" % (tag)
tracker.scanTag(tag)
tracker.report()
tracker.runRebuilds(tag)