From b3cbefffb38f2ad5933d3819e844254a0199720a Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Sat, 16 Jul 2022 12:21:04 +0200 Subject: [PATCH] fix release_check --- .ci/release_check.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.ci/release_check.py b/.ci/release_check.py index 3cde66ffb..7e592f498 100644 --- a/.ci/release_check.py +++ b/.ci/release_check.py @@ -12,10 +12,11 @@ with open(version_fn) as f: version = {} exec(f.read(), version) - iminuit_version = version["version"] + iminuit_version = parse_version(version["version"]) root_version = version["root_version"] -print("iminuit version:", iminuit_version, root_version) +print("iminuit version:", iminuit_version) +print("root version:", root_version) # check that root version is up-to-date git_submodule = subp.check_output( @@ -30,15 +31,13 @@ this_root_version = parts[2][1:-1] # strip braces - print("actual ROOT version:", this_root_version) - assert ( root_version == this_root_version ), f"ROOT version does not match: {root_version} != {this_root_version}" # make sure that changelog was updated with open(changelog_fn) as f: - assert iminuit_version in f.read(), "changelog entry missing" + assert str(iminuit_version) in f.read(), "changelog entry missing" # make sure that version is not already tagged tags = subp.check_output(["git", "tag"]).decode().strip().split("\n") @@ -49,6 +48,6 @@ pypi_versions = [parse_version(v) for v in json.loads(r.read())["releases"]] pypi_versions.sort() -print("latest PyPI version:", pypi_versions[-1]) +print("PyPI version:", pypi_versions[-1]) -assert parse_version(iminuit_version) not in pypi_versions, "pypi version exists" +assert iminuit_version not in pypi_versions, "pypi version exists"