Skip to content

Commit

Permalink
fix release_check
Browse files Browse the repository at this point in the history
  • Loading branch information
HDembinski committed Jul 16, 2022
1 parent e585909 commit b3cbeff
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .ci/release_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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")
Expand All @@ -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"

0 comments on commit b3cbeff

Please sign in to comment.