@@ -545,83 +545,71 @@ access on the GitHub repo.
545545
546546The preferred workflow is:
547547
548- 1 . Make a PR that merges appropriate changes from the main branch to
549- the release branch:
548+ 1 . Cherry-pick commits from the main branch to the release branch,
549+ compose release notes, and bump the version number.
550550
551- a. In a forked clone, create a branch to hold the patch commits,
552- e.g. `` v3.1.9-fixes `` .
551+ a. Create a new PR label for the new release (on the GitHub "Pull
552+ Request" page), identify all PRs to be included, and assign the
553+ label to them. Run:
553554
554- b. Cherry-pick the appropriate commits from `` main `` , resolving any
555- merge conflicts.
555+ % share/util/release.py log
556556
557- c. Increment `` OPENEXR_VERSION_PATCH `` in
558- [ src/lib/OpenEXRCore/openexr_version.h] ( src/lib/OpenEXRCore/openexr_version.h )
559-
560- d. Update the `` IMATH_TAG `` setting in
561- [ cmake/OpenEXRSetup.cmake] ( cmake/OpenEXRSetup.cmake ) to
562- correspond to the proper Imath release.
563-
564- e. Add release notes to [ CHANGES.md] ( CHANGES.md ) :
565-
566- - Generate a list of links to merged pull requests.
567-
568- Use `` git log `` to identify the merged commits, and for each
569- commit, and add a link in the notes to the corresponding PR
570- that merged it to `` main `` . Citing PR's in the release notes
571- is preferable to citing raw commits because the PR's often
572- have helpful information and discussion missing from the
573- commit descriptions, and the commit history is readily
574- accessible via `` git log `` anyway.
575-
576- The typical OpenEXR project workflow uses "squash and merge"
577- to merge PR's into `` main `` , so the changes involved in each
578- PR end up on `` main `` as a single commit. This is preferable
579- because a raw PR often includes numerous commits that address
580- comments and feedback or fix typos or mistakes, intermediate
581- steps not helpful to the preserved history of the main
582- development thread. Note that GitHub's "squash and merge"
583- helpfully appends the PR number to the commit subject line.
584-
585- Note that when this PR is merged to the release branch, it
586- should go in via "rebase and merge" that the release branch
587- retains the granular changes, described below.
588-
589- - Generate a list of OSS-Fuzz issues addressed.
590-
591- These are security concerns, so they deserve special
592- attention. Provide a link in the notes to the issue at
593- https://bugs.chromium.org/p/oss-fuzz , including the issue id
594- number and description.
595-
596- - If there are any public CVE's, mention them explicitly with a
597- link to the CVE registry item.
598-
599- - Provide an executive summary of the patch changes, in a few
600- sentences as well as bullet points if appropriate.
601-
602- - Choose a proposed release date at least several days in
603- advance.
604-
605- f. If there are any public CVE's, reference them in
606- [ SECURITY.md] ( SECURITY.md ) .
607-
608- g. Submit the PR for others to review. The PR should go * to the
609- release branch, not `` main `` * , obviously.
557+ to print recent commits and their associated PRs and release
558+ labels. The best practice is to ensure that every PR is labeled
559+ with the release it should go into, even if that is the next
560+ major release.
561+
562+ Note that this relies on the commit message having the PR number
563+ appended to the end, which GitHub adds on "Squash and
564+ merge". PRs merged via "Rebase and merge" do * not* get this PR
565+ number, which leaves you to manually decipher the PRs to report
566+ in the release notes. Our project policy is to "Squash and
567+ merge" whenever possible, unless the PR's individual commits
568+ really do need to be preserved in the history.
569+
570+ b. Identify the main branch commits to cherry pick to the release
571+ branch:
572+
573+ % share/util/release.py cherry <tag>
574+
575+ This will print the SHAs for the commits associated with the
576+ labeled PRs. The output will look something like:
577+
578+ git cherry-pick 2e32c6b # Bump actions/cache from 5.0.3 to 5.0.4 (#2311 )
579+ git cherry-pick 3df0122 # Pin pypa/cibuildwheel actions to release sha (#2294 )
580+ git cherry-pick 6155271 # Force macos cibuildwheel to use Xcode clang (#2315 )
581+ share/util/release.py changes v3.4.8 2311 2294 2315
582+
583+ c. Cherry-pick the commits (copy & execute output from ` release.py cherry ` ):
584+
585+ % git checkout RB-3.4
586+ % git cherry-pick 2e32c6b
587+ % git cherry-pick 3df0122
588+ % git cherry-pick 6155271
589+
590+ This may involve resolving conflicts along the way. Confirm the
591+ updated branch builds successfully.
592+
593+ d. Create a new section in the ` CHANGES.md ` release notes file:
594+
595+ % share/util/release.py changes <tag> <pr list>
610596
611- h. After others have had a chance to sanity-check the changes,
612- merge the PR * with "rebase and merge"* . Unlike with the usual
613- PR's merged to main, it is essential to retain the individual
614- commits on the release branch. That way, the release branch
615- commit history retains the details of the changes.
597+ This is the command as printed at the end of the output of the
598+ "cherry" command. This will add a new section to ` CHANGES.md `
599+ and add entries to the PR lists. Run this from the release
600+ branch, since it's preparing a commit for there.
601+
602+ e. Edit ` CHANGES.md ` and compose a release notes summary. Commit
603+ this change.
616604
617- i. If further fixes come in that need to go into the release, push
618- them to the PR branch. It's not absolutely essential that all
619- changes to the release branch go in via a PR. The PR is simply a
620- convenient forum for publicly discussing and reviewing the
621- composition of the release.
605+ f. Bump the version number in
606+ ` src/lib/OpenEXRCore/openexr_version.h ` . Commit this change.
622607
608+ g. Push the release branch and confirm the CI passes.
609+
6236102 . Tag the release with a `` -rc `` "release candidate" tag,
624- e.g. `` v3.1.9-rc `` .
611+ e.g. `` v3.1.9-rc `` . Push the tag via ` git push --tags ` . This will
612+ trigger the release candidate workflow.
625613
6266143 . Validate ABI compatibility. Build at the release candidate tag and
627615 run
@@ -635,15 +623,13 @@ The preferred workflow is:
635623 of the release with link to the release candidate tag. Include the
636624 release notes from [ CHANGES.md] ( CHANGES.md ) for review.
637625
638- 5 . Draft the release on the GitHub
639- [ Releases] ( https://github.com/AcademySoftwareFoundation/openexr/releases )
640- page. Include the summary from the notes in
641- [ CHANGES.md] ( CHANGES.md ) , but don't include the list of PR's.
642-
643- Create the release from the latest `` --rc `` tag, and give it a name
644- that begins with `` v `` , i.e. `` v3.1.9 `` .
626+ 5 . Draft the GitHub release via:
645627
646- Save the release as a "draft".
628+ % share/util/release.py draft <tag>
629+
630+ Verify the notes look correct on the
631+ [ Releases] ( https://github.com/AcademySoftwareFoundation/openexr/releases )
632+ page and edit as appropriate. Save as a "draft".
647633
6486346 . Wait at least 48 hours, to give the community time to discover and
649635 report any obvious problems. Avoid the temptation to rush changes
@@ -652,13 +638,12 @@ The preferred workflow is:
652638
653639 If additional fixes need to go in before release:
654640
655- a. Merge commits to the release branch. Push them directly, no need
656- for a pull request.
641+ a. Merge commits to the release branch. Push them directly.
657642
658643 b. Update the release notes in a separate commit.
659644
660645 c. Re-tag with a incremented "release candidate" number,
661- e.g. `` v3.1.9-rc2 `` .
646+ e.g. `` v3.1.9-rc2 `` .
662647
663648 d. Send an email update to `` openexr-dev@lists.aswf.io `` notifying
664649 the community of the addition and the new tag.
@@ -671,15 +656,22 @@ The preferred workflow is:
671656 [ registered] ( https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key )
672657 with your GitHub account and git config.
673658
674- b. Create a signed tag with the release name via ` git tag -s v3.1.9 ` .
659+ b. Create a signed tag with the release name via:
660+
661+ git tag -s v3.1.9
675662
676- c. Push the tag via ` git push --tags `
663+ c. Push the tag via:
664+
665+ git push --tags
677666
6786678 . Publish the release
679668
680- a. Click the "Publish release" button on the GitHub release draft
669+ a. Set the release to correspond to the latest release candidate
670+ tag.
671+
672+ b. Click the "Publish release" button on the GitHub release draft
681673
682- b . Send an email to `` openexr-dev@lists.aswf.io `` officially
674+ c . Send an email to `` openexr-dev@lists.aswf.io `` officially
683675 announcing the release.
684676
6856779 . Update the `` release `` branch, which should always point to the
@@ -688,9 +680,9 @@ The preferred workflow is:
688680
689681 From a clone of the main repo:
690682
691- % git checkout release
692- % git merge RB-3.1
693- % git push
683+ % git checkout release
684+ % git merge RB-3.1
685+ % git push
694686
69568710 . Submit a PR that adds the release notes to [ CHANGES.md] ( CHANGES.md )
696688 on the main branch. Cherry-pick the release notes commit from
@@ -700,18 +692,25 @@ The preferred workflow is:
700692 the associated commit as well.
701693
702694 - Also include in this PR edits to [ `` website/news.rst `` ] ( website/news.rst )
703- that add an announcement of the release.
695+ that add an announcement of the release:
696+
697+ share/util/release.py news v3.4.8
704698
705- 11 . After review/merge of the updates to `` website/news.rst `` , build the
706- website at https://readthedocs.org/projects/openexr .
699+ This will edit the website source files to add the news item.
707700
701+ - Get the PR approved and merged promptly so the news item appears
702+ on the website. The website rebuilds automatically at
703+ https://readthedocs.org/projects/openexr on changes to the main
704+ branch, so no action is required.
705+
70870612 . If the release has resolved any OSS-Fuzz issues, update the
709707 associated pages at https://bugs.chromium.org/p/oss-fuzz with a
710708 reference to the release.
711709
712- 13 . If the release has resolved any public CVE's , request an update
710+ 13 . If the release has resolved any public CVEs , request an update
713711 from the registry service providing the release and a link to the
714- release notes.
712+ release notes. Add a reference to resolved public CVEs to
713+ ` SECURITY.md ` and submit as a PR.
715714
716715## Creating a Major/Minor Release
717716
0 commit comments