Skip to content

Commit

Permalink
ci(dist): fix check_dist.py version string validation (#1565)
Browse files Browse the repository at this point in the history
* only require strictly numeric version string for approved releases
  • Loading branch information
wpbonelli authored Jan 20, 2024
1 parent 7a3b8fa commit e2dfe05
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions distribution/check_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,12 @@ def test_binaries(dist_dir_path, approved):

# check version numbers
version = output.lower().split(" ")[1]
print(version)
print("Version string:", version)
v_split = version.split(".")
assert len(v_split) >= 3
assert all(s.isdigit() for s in v_split[:3])

# approved release should use semantic version number with
# exactly 3 components and no alphabetic characters in it
if approved:
assert len(v_split) == 3
else:
assert "dev" in v_split[3]
assert all(s.isdigit() for s in v_split[:3])

0 comments on commit e2dfe05

Please sign in to comment.