Skip to content

Commit e4ba90f

Browse files
committed
make-tag: Remove MSVC check
The MSVC check is no longer necessary as of bitcoin/bitcoin#23198, which generates the version information by parsing `configure.ac`. (we like want to backport that 22.1 as well, before the next minor release there, to avoid needing three variants of the make-tag script)
1 parent 830b36c commit e4ba90f

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

make-tag.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -90,41 +90,6 @@ def check_configure_ac(spec):
9090
print(f"{filename}: Version from tag {version_name(spec)} doesn't match specified version {version_name(cfg_spec)}", file=sys.stderr)
9191
sys.exit(1)
9292

93-
def check_msvc_config_h(spec):
94-
info = {}
95-
filename = 'build_msvc/bitcoin_config.h'
96-
with open(filename) as f:
97-
for line in f:
98-
m = re.match("#define ([A-Z_]+) (.+)$", line)
99-
if m:
100-
info[m.group(1)] = m.group(2)
101-
# check if IS_RELEASE is set
102-
if info["CLIENT_VERSION_IS_RELEASE"] != "true":
103-
print(f'{filename}: IS_RELEASE is not set to true', file=sys.stderr)
104-
sys.exit(1)
105-
106-
package_name = info['PACKAGE_NAME'][1:-1]
107-
if info['PACKAGE_STRING'] != f'"{package_name} {spec.major}.{spec.minor}.{spec.build}"':
108-
print(f'PACKAGE_STRING is not set correctly for msvc')
109-
sys.exit(1)
110-
111-
if info['PACKAGE_VERSION'] != f'"{spec.major}.{spec.minor}.{spec.build}"':
112-
print(f'PACKAGE_VERSION is not set correctly for msvc')
113-
sys.exit(1)
114-
115-
msvc_spec = VersionSpec(
116-
int(info['CLIENT_VERSION_MAJOR']),
117-
int(info['CLIENT_VERSION_MINOR']),
118-
int(info['CLIENT_VERSION_BUILD']),
119-
None, # RC is not specified here
120-
)
121-
122-
if (msvc_spec.major != spec.major or
123-
msvc_spec.minor != spec.minor or
124-
msvc_spec.build != spec.build):
125-
print(f"{filename}: Version from tag {version_name(spec)} doesn't match specified version {version_name(msvc_spec)}", file=sys.stderr)
126-
sys.exit(1)
127-
12893
def main():
12994
try:
13095
tag = sys.argv[1]
@@ -147,9 +112,6 @@ def main():
147112
# Check version components against configure.ac in git tree
148113
check_configure_ac(spec)
149114

150-
# Check version components against MSVC build config
151-
check_msvc_config_h(spec)
152-
153115
# Generate base message
154116
if not spec.build:
155117
version = f"{spec.major}.{spec.minor}"

0 commit comments

Comments
 (0)