chore: make large beta numbers work when publishing (#14572)
This commit is contained in:
parent
8d27657fa5
commit
e76a976347
1 changed files with 7 additions and 2 deletions
|
@ -331,13 +331,18 @@ def get_next_nightly(v):
|
||||||
def non_empty(thing):
|
def non_empty(thing):
|
||||||
return thing.strip() != ''
|
return thing.strip() != ''
|
||||||
|
|
||||||
|
def beta_tag_compare(tag1, tag2):
|
||||||
|
p1 = parse_version(tag1)
|
||||||
|
p2 = parse_version(tag2)
|
||||||
|
return int(p1[3]) - int(p2[3])
|
||||||
|
|
||||||
def get_next_beta(v):
|
def get_next_beta(v):
|
||||||
pv = clean_parse_version(v)
|
pv = clean_parse_version(v)
|
||||||
tag_pattern = 'v' + pv[0] + '.' + pv[1] + '.' + pv[2] + '-beta.*'
|
tag_pattern = 'v' + pv[0] + '.' + pv[1] + '.' + pv[2] + '-beta.*'
|
||||||
tag_list = filter(
|
tag_list = sorted(filter(
|
||||||
non_empty,
|
non_empty,
|
||||||
execute(['git', 'tag', '--list', '-l', tag_pattern]).strip().split('\n')
|
execute(['git', 'tag', '--list', '-l', tag_pattern]).strip().split('\n')
|
||||||
)
|
), cmp=beta_tag_compare)
|
||||||
if len(tag_list) == 0:
|
if len(tag_list) == 0:
|
||||||
return make_version(pv[0] , pv[1], pv[2], 'beta.1')
|
return make_version(pv[0] , pv[1], pv[2], 'beta.1')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue