Skip to content

Commit

Permalink
SNOW-1055755: wix3 installer - d4
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mraba committed Sep 17, 2024
1 parent 74350f1 commit e310c18
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions scripts/packaging/win/build_version.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
from time import time

from snowflake.cli.__about__ import VERSION

if len(version := VERSION.split(".")) > 3:
version[-1] = str(int(time()))
else:
version.append("0")

print(".".join(version))
def parse_version_for_windows_build() -> list[str]:
version = VERSION.split(".")
*msv, last = version

match last:
case last if last.isdigit():
version.append("0")
case last if "rc" in last:
version = msv + last.split("rc")
case last if "dev" in last:
version = msv + last.split("dev")

return version


if __name__ == "__main__":
version = parse_version_for_windows_build()
print(".".join(version))

0 comments on commit e310c18

Please sign in to comment.