Skip to content

Commit

Permalink
Include Github run numbered in release candidate version
Browse files Browse the repository at this point in the history
We can't make multiple different versions for the same day.

With this change the release candidates will have a version of the form
3.2.0rc20250205.0
3.2.0rc20250205.1
...
instead of just 3.2.0rc20250205.

Signed-off-by: Boian Petkantchin <[email protected]>
  • Loading branch information
sogartar committed Feb 10, 2025
1 parent 4214677 commit 8a76301
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ jobs:

- name: Build iree-turbine release candidate
run: |
./build_tools/compute_local_version.py -rc --write-json
./build_tools/compute_local_version.py \
-rc --write-json \
--version-suffix ".${{ github.run_number }}"
./build_tools/build_release.py --no-download
- name: Upload python wheels
Expand Down
5 changes: 3 additions & 2 deletions build_tools/compute_local_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

parser = argparse.ArgumentParser()
parser.add_argument("--write-json", action="store_true")
parser.add_argument("--version-suffix", action="store", type=str)

release_type = parser.add_mutually_exclusive_group(required=True)
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("--version-suffix", action="store", type=str)

args = parser.parse_args()

Expand Down Expand Up @@ -55,7 +55,8 @@ def write_version_to_file(version_file, version):
".dev0+"
+ subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("ascii").strip()
)
elif args.version_suffix:

if args.version_suffix:
current_version += args.version_suffix

if args.write_json:
Expand Down

0 comments on commit 8a76301

Please sign in to comment.