From 5ec03cb0689e0f5e6f6dd05d203e33dabb3caa77 Mon Sep 17 00:00:00 2001 From: Gerrod Ubben Date: Thu, 21 Nov 2024 10:35:27 -0500 Subject: [PATCH] Fix find_pulpcore_version script for new pyproject.toml changes --- .ci/scripts/find_pulpcore_version.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.ci/scripts/find_pulpcore_version.py b/.ci/scripts/find_pulpcore_version.py index 2a3455f1..d8395011 100644 --- a/.ci/scripts/find_pulpcore_version.py +++ b/.ci/scripts/find_pulpcore_version.py @@ -1,7 +1,7 @@ import argparse import requests from packaging.version import parse -import configparser +import tomllib if __name__ == "__main__": @@ -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)