Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix find_pulpcore_version script for new pyproject.toml changes #695

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .ci/scripts/find_pulpcore_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import argparse
import requests
from packaging.version import parse
import configparser
import tomllib


if __name__ == "__main__":
Expand All @@ -15,12 +15,11 @@
version = ""
if opts.branch == "main":
# Used for nightly image, find the pulpcore version from @main
r = requests.get("https://raw.githubusercontent.com/pulp/pulpcore/main/.bumpversion.cfg")
r = requests.get("https://raw.githubusercontent.com/pulp/pulpcore/refs/heads/main/pyproject.toml")
if r.status_code == 200:
config = configparser.ConfigParser()
config.read_string(r.text)
if "bumpversion" in config:
version = config["bumpversion"]["current_version"]
config = tomllib.loads(r.text)
if "project" in config:
version = config["project"]["version"]
else:
print("Failed to find current version on main")
exit(1)
Expand Down
Loading