Skip to content

Commit

Permalink
Harmonize script with what is used in IREE
Browse files Browse the repository at this point in the history
  • Loading branch information
marbre committed Dec 11, 2024
1 parent bc35630 commit c80559d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build_tools/compute_local_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
release_type.add_argument("-stable", "--stable-release", action="store_true")
release_type.add_argument("-rc", "--nightly-release", action="store_true")
release_type.add_argument("-dev", "--development-release", action="store_true")
release_type.add_argument("--custom-string", action="store", type=str)
release_type.add_argument("--version-suffix", action="store", type=str)

args = parser.parse_args()

Expand Down Expand Up @@ -52,11 +52,11 @@ def write_version_to_file(version_file, version):
current_version += "rc" + datetime.today().strftime("%Y%m%d")
elif args.development_release:
current_version += (
".dev+"
".dev0+"
+ subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("ascii").strip()
)
elif args.custom_string:
current_version += args.custom_string
elif args.version_suffix:
current_version += args.version_suffix

if args.write_json:
write_version_to_file(VERSION_LOCAL_FILE_PATH, current_version)
Expand Down

0 comments on commit c80559d

Please sign in to comment.