Move default branch to current VERSION content instead of master

Fixes #2418

X-DeepSpeech: NOBUILD
This commit is contained in:
Alexandre Lissy 2019-10-09 14:29:11 +02:00
parent f893dc8c23
commit 5e7679593b
1 changed files with 6 additions and 11 deletions

View File

@ -80,7 +80,7 @@ def main():
parser.add_argument('--source', required=False, default=None, parser.add_argument('--source', required=False, default=None,
help='Name of the TaskCluster scheme to use.') help='Name of the TaskCluster scheme to use.')
parser.add_argument('--branch', required=False, parser.add_argument('--branch', required=False,
help='Branch name to use. Defaulting to "master".') help='Branch name to use. Defaulting to current content of VERSION file.')
parser.add_argument('--decoder', action='store_true', parser.add_argument('--decoder', action='store_true',
help='Get URL to ds_ctcdecoder Python package.') help='Get URL to ds_ctcdecoder Python package.')
@ -103,10 +103,12 @@ def main():
else: else:
args.arch = 'cpu' args.arch = 'cpu'
has_branch_set = True
if not args.branch: if not args.branch:
has_branch_set = False version_string = read('../VERSION').strip()
args.branch = 'master' ds_version = parse_version(version_string)
args.branch = "v{}".format(version_string)
else:
ds_version = args.branch.lstrip('v')
if args.decoder: if args.decoder:
plat = platform.system().lower() plat = platform.system().lower()
@ -118,13 +120,6 @@ def main():
if plat == 'darwin': if plat == 'darwin':
plat = 'macosx_10_10' plat = 'macosx_10_10'
if has_branch_set:
ds_version = args.branch.lstrip('v')
else:
version_string = read('../VERSION').strip()
ds_version = parse_version(version_string)
args.branch = "v{}".format(version_string)
m_or_mu = 'mu' if is_ucs2 else 'm' m_or_mu = 'mu' if is_ucs2 else 'm'
pyver = ''.join(map(str, sys.version_info[0:2])) pyver = ''.join(map(str, sys.version_info[0:2]))