Skip to content

Commit d7b0972

Browse files
committed
[build] Fix version script for Windows builds.
1 parent 1e961cc commit d7b0972

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dist/pre_release.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535

3636
with open("dist/.version_info", "wb") as f:
3737
v = VERSION.split(".")
38-
assert 2 <= len(v) <= 3, f"Unrecognized version format: {VERSION}"
39-
if len(v) < 3:
38+
assert 2 <= len(v) <= 4, f"Unrecognized version format: {VERSION}"
39+
while len(v) < 4:
4040
v.append("0")
41-
(maj, min, pat, bld) = v[0], v[1], v[2], 0
41+
(maj, min, pat, bld) = v[0], v[1], v[2], v[3]
4242
# If either major or minor have suffixes, assume it's a dev/beta build and set
4343
# the final component to 999.
4444
if not min.isdigit():

0 commit comments

Comments
 (0)