diff --git a/.github/update-release-branch.py b/.github/update-release-branch.py index 90d3c995b7..ff65abe84d 100644 --- a/.github/update-release-branch.py +++ b/.github/update-release-branch.py @@ -97,13 +97,13 @@ def open_pr( if not is_primary_release: body.append(' - [ ] Remove and re-add the "Update dependencies" label to the PR to trigger just this workflow.') body.append(' - [ ] Wait for the "Update dependencies" workflow to push a commit updating the dependencies.') - body.append(' - [ ] Mark the PR as ready for review to trigger the full set of PR checks.') + body.append(' - [ ] Mark the PR as ready for review to trigger the full set of PR checks.') body.append(' - [ ] Approve and merge this PR. Make sure `Create a merge commit` is selected rather than `Squash and merge` or `Rebase and merge`.') if is_primary_release: body.append(' - [ ] Merge the mergeback PR that will automatically be created once this PR is merged.') - body.append(' - [ ] Merge the v1 release PR that will automatically be created once this PR is merged.') + body.append(' - [ ] Merge all backport PRs to older release branches, that will automatically be created once this PR is merged.') title = f'Merge {source_branch} into {target_branch}' labels = ['Update dependencies'] if not is_primary_release else [] @@ -300,7 +300,6 @@ def main(): # Also revert the "Update checked-in dependencies" commit created by Actions. update_dependencies_commit = run_git('log', '--grep', '^Update checked-in dependencies', '--format=%H').split()[0] - # TODO: why is this failing for the v2 branch currently...? print(f' Reverting {update_dependencies_commit}') run_git('revert', update_dependencies_commit, '--no-edit') @@ -326,7 +325,7 @@ def main(): # Remove changelog notes from all versions that do not apply to the vOlder branch print(f'Removing changelog notes that do not apply to v{target_branch_major_version}') - for v in range(int(target_branch_major_version)+1, int(source_branch_major_version)+1): + for v in range(int(source_branch_major_version), int(target_branch_major_version), -1): print(f'Removing changelog notes that are tagged [v{v}+ only\]') subprocess.check_output(['sed', '-i', f'/^- \[v{v}+ only\]/d', 'CHANGELOG.md']) diff --git a/.github/workflows/post-release-mergeback.yml b/.github/workflows/post-release-mergeback.yml index f4cba080cc..c3d0b291a4 100644 --- a/.github/workflows/post-release-mergeback.yml +++ b/.github/workflows/post-release-mergeback.yml @@ -3,7 +3,7 @@ # tag # 2. Updates the `vN` tag to refer to this merge commit. # 3. Iff vN == vLatest, merges any changes from the release back into the main branch. -# Typically, this is just a single commit that updates the changelog. +# Typically, this is two commits – one to update the version number and one to update dependencies. name: Tag release and merge back on: diff --git a/.github/workflows/update-release-branch.yml b/.github/workflows/update-release-branch.yml index f5ab2cda85..05fc4c43c1 100644 --- a/.github/workflows/update-release-branch.yml +++ b/.github/workflows/update-release-branch.yml @@ -105,7 +105,7 @@ jobs: timeout-minutes: 45 runs-on: ubuntu-latest needs: [prepare] - if: ${{ (github.event_name == 'push') && needs.prepare.outputs.backport_target_branches != '[]' && needs.prepare.outputs.backport_target_branches != '' }} + if: ${{ (github.event_name == 'push') && needs.prepare.outputs.backport_target_branches != '[]' }} strategy: fail-fast: false matrix: