Skip to content

Commit b5fabbc

Browse files
committed
Merge #128: make-tag: Remove MSVC check
e4ba90f make-tag: Remove MSVC check (laanwj) Pull request description: The MSVC check is no longer necessary as of bitcoin/bitcoin#23198, which generates the version information by parsing `configure.ac`. (we likely want to backport that to 22.1 as well, to avoid needing three variants of the make-tag script) Top commit has no ACKs. Tree-SHA512: 408e3cad8da718b9c57f68756183c7cfb38883b266402d13d25abc8da8b18e849d84b1dcf4ae45b4c5e2ae66fca4aa288a0e1c3f7439b75a8205adbaf8648263
2 parents 7369af9 + e4ba90f commit b5fabbc

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)