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 64
64
run : |
65
65
./rdev.sh ci check-pyproject
66
66
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
67
72
68
73
#
69
74
# Build other wheels first (OS-specific, not python specific)
Original file line number Diff line number Diff line change 3
3
#
4
4
5
5
import pathlib
6
+ import subprocess
6
7
import sys
7
8
import typing as T
8
9
9
10
import click
10
11
from packaging .requirements import Requirement
12
+ from packaging .version import Version
11
13
12
14
from .ctx import Context
13
15
from .update_pyproject import ProjectUpdater
@@ -37,6 +39,27 @@ def check_pyproject(ctx: Context):
37
39
print ("OK" )
38
40
39
41
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
+
40
63
@ci .command ()
41
64
@click .option ("--no-test" , default = False , is_flag = True )
42
65
@click .pass_obj
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ native = "2025.3.2"
17
17
halsim_native = " 2025.3.2.2"
18
18
19
19
# 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
20
21
wrapper = " 2025.3.2.2"
21
22
22
23
[params ]
You can’t perform that action at this time.
0 commit comments