Skip to content
Closed
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
21 changes: 15 additions & 6 deletions scripts/generate_rocky_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,12 +730,21 @@ def generate_rocky_config(
continue

# Skip if version filter specified and doesn't match
if (
version
and metadata["version"] != version
and metadata["version"] != UNKNOWN_VALUE
):
continue
# Support matching major version only (e.g., "9" matches "9.6")
if version and metadata["version"] != UNKNOWN_VALUE:
version_matches = False

# If filter version has no minor (e.g., "9"), match by major version only
if "." not in version:
# Extract major version from metadata version
metadata_major = metadata["version"].split(".")[0] if "." in metadata["version"] else metadata["version"]
version_matches = (metadata_major == version)
else:
# Exact match required for full versions (e.g., "9.6")
version_matches = (metadata["version"] == version)

if not version_matches:
continue

# Skip debug repos if not wanted
if not include_debug and metadata["repo_type"] == "debug":
Expand Down
Loading