File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 6464 run : |
6565 ./rdev.sh ci check-pyproject
6666
67+ - name : Check git tag
68+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
69+ shell : bash
70+ run : |
71+ ./rdev.sh ci check-tag
6772
6873 #
6974 # Build other wheels first (OS-specific, not python specific)
Original file line number Diff line number Diff line change 33#
44
55import pathlib
6+ import subprocess
67import sys
78import typing as T
89
910import click
1011from packaging .requirements import Requirement
12+ from packaging .version import Version
1113
1214from .ctx import Context
1315from .update_pyproject import ProjectUpdater
@@ -37,6 +39,27 @@ def check_pyproject(ctx: Context):
3739 print ("OK" )
3840
3941
42+ @ci .command
43+ @click .pass_obj
44+ def check_tag (ctx : Context ):
45+ """
46+ Ensures that the current git tag matches the 'wrapper' version
47+ """
48+ wrapper_version = Version (ctx .cfg .py_versions ["wrapper" ])
49+ raw_git_version = subprocess .check_output (
50+ ["git" , "describe" , "--tags" ], encoding = "utf-8"
51+ )
52+ git_version = Version (raw_git_version .split ("-" , 1 )[0 ])
53+ print ("Wrapper version :" , wrapper_version )
54+ print ("Git version :" , git_version )
55+
56+ if wrapper_version != git_version :
57+ print ("ERROR: git tag does not match wrapper version" )
58+ exit (1 )
59+ else :
60+ print ("OK" )
61+
62+
4063@ci .command ()
4164@click .option ("--no-test" , default = False , is_flag = True )
4265@click .pass_obj
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ native = "2025.3.2"
1717halsim_native = " 2025.3.2.2"
1818
1919# Usually similar to native, but subminor version is bumped for bugfixes
20+ # - ./rdev.sh ci check_tag will fail if this doesn't match current tag
2021wrapper = " 2025.3.2.2"
2122
2223[params ]
You can’t perform that action at this time.
0 commit comments