diff --git a/.ci/scripts/check_release.py b/.ci/scripts/check_release.py index 8e6afea1d..1e89716df 100755 --- a/.ci/scripts/check_release.py +++ b/.ci/scripts/check_release.py @@ -65,7 +65,7 @@ def main(): if branch != DEFAULT_BRANCH: # Check if a Z release is needed changes = repo.git.ls_tree("-r", "--name-only", f"origin/{branch}", "CHANGES/") - z_release = False + z_changelog = False for change in changes.split("\n"): # Check each changelog file to make sure everything checks out _, ext = os.path.splitext(change) @@ -75,8 +75,13 @@ def main(): f"{branch} release branch!" ) elif ext in Z_CHANGELOG_EXTS: - z_release = True - if z_release: + z_changelog = True + + last_tag = repo.git.describe("--tags", "--abbrev=0", f"origin/{branch}") + req_txt_diff = repo.git.diff( + f"{last_tag}", f"origin/{branch}", "--name-only", "--", "requirements.txt" + ) + if z_changelog or req_txt_diff: # Blobless clone does not have file contents for Z branches, # check commit message for last Z bump git_branch = f"origin/{branch}" @@ -106,9 +111,12 @@ def main(): # You could, theoretically, be next_vers==None here - but that's always # been true for this script. next_version = Version(next_version) + reason = "CHANGES" if z_changelog else "requirements.txt" print( f"A Z-release is needed for {branch}, " - f"New Version: {next_version.base_version}" + f"Prev: {last_tag}, " + f"Next: {next_version.base_version}, " + f"Reason: {reason}" ) releases.append(next_version) else: diff --git a/.github/template_gitref b/.github/template_gitref index adbf44858..d42a1cd95 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-322-g8700c1c +2021.08.26-324-gb820cc2