Skip to content

Commit

Permalink
infra: bumpver: Use templating for the script
Browse files Browse the repository at this point in the history
Let's make the script working between branching by getting the version
validation from the templates.
  • Loading branch information
jkonecny12 committed Dec 1, 2023
1 parent 0f16458 commit d6c97ba
Show file tree
Hide file tree
Showing 2 changed files with 471 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/makebumpver
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/usr/bin/python3
# ======================================
# WARNING!
# THIS FILE IS GENERATED FROM A TEMPLATE
# DO NOT EDIT THIS FILE MANUALLY!
# ======================================
# The template is located in: makebumpver.j2

#
# makebumpver - Increment version number and add in RPM spec file changelog
# block. Ensures rhel*-branch commits reference RHEL bugs.
Expand Down Expand Up @@ -121,8 +128,7 @@ class JIRAValidator:
def validate_RHEL_issue_fixversion(self, bug):
issue = self._query_RHEL_issue(bug)

# TODO: Switch this to template solution "distro_release"
valid_fix_version = "rhel-9"
valid_fix_version = rhel-9
fix_version = issue.fields.fixVersions
for version in fix_version:
# Let's simplify and check only major version (ignore minor RHEL releases)
Expand Down
Loading

0 comments on commit d6c97ba

Please sign in to comment.