hacking: fix announce script version parsing (#71008)
Change: - Fix a bug where rc/beta versions throw off the "is this an ansible-base release"? check. Test Plan: - Used it for 2.10.0rc4 Signed-off-by: Rick Elrod <rick@elrod.me>
This commit is contained in:
parent
f99f96ceb6
commit
75e8da0950
1 changed files with 5 additions and 2 deletions
|
@ -235,8 +235,11 @@ def is_ansible_base(version):
|
||||||
ver_split = []
|
ver_split = []
|
||||||
for component in version.split('.'):
|
for component in version.split('.'):
|
||||||
if not component.isdigit():
|
if not component.isdigit():
|
||||||
# Take everything up until the first non-numeric component
|
if 'rc' in component:
|
||||||
break
|
ver_split.append(int(component.split('rc')[0]))
|
||||||
|
if 'b' in component:
|
||||||
|
ver_split.append(int(component.split('b')[0]))
|
||||||
|
continue
|
||||||
ver_split.append(int(component))
|
ver_split.append(int(component))
|
||||||
return tuple(ver_split) >= (2, 10, 0)
|
return tuple(ver_split) >= (2, 10, 0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue