|
| 1 | +# Steps to Cut a New Terminus Release |
| 2 | + |
| 3 | +Terminus uses [Semantic Versioning](https://semver.org/) in the format of `major.minor.patch`. |
| 4 | + |
| 5 | +If any of these steps should fail, abort the release-cutting process. |
| 6 | + |
| 7 | +1. For major or minor version releases, the CMS Eco product owner will decide when the new version can be released. Patch releases can be shipped as soon as Engineering is satisfied. |
| 8 | + |
| 9 | +2. Move into the Terminus project's root directory and check out your target branch (e.g. `3.x`). Update that branch by using `git pull` to ensure it is up to date. |
| 10 | + |
| 11 | +3. Check out a new branch for the updated version you wish to release, giving it a descriptive name like `update_to_1.0.4`. Don't use the version tag as the branch name; tags and branches can't have the same name. |
| 12 | + |
| 13 | +4. Update the version number in these two locations in the codebase: |
| 14 | + 1. TERMINUS_VERSION in `config/constants.yml` |
| 15 | + 2. Update `## Master` in `CHANGELOG.md` to be `## [<version_number>] - <today's_date_in_big_endian>` |
| 16 | + |
| 17 | +5. Commit and push your update branch and open a pull request to merge into the target branch tested in **Step 2** above (e.g. `3.x`). |
| 18 | + 1. Get approval from someone authorized to approve Terminus PRs and merge this into your target branch. |
| 19 | + |
| 20 | +6. Test your work to ensure that Composer won't have trouble installing the application. |
| 21 | + 1. Create a new directory anywhere but in Terminus and change into it before running the test. |
| 22 | + 2. Run this command. Answer `n` (No) if prompted to use another composer.json file in a directory above yours. |
| 23 | + ``` |
| 24 | + composer require pantheon-systems/terminus:3.x-dev |
| 25 | + ``` |
| 26 | + 3. If there are no errors, you can delete the directory and proceed. |
| 27 | +
|
| 28 | +7. Create a CCB Ticket and get approval from the change committee. [https://getpantheon.atlassian.net/secure/CreateIssue.jspa?issuetype=ccb-change-request&pid=14450](https://getpantheon.atlassian.net/secure/CreateIssue.jspa?issuetype=ccb-change-request&pid=14450) |
| 29 | +
|
| 30 | +8. Once approved, Create a tag: |
| 31 | + 1. On your local machine, checkout the target branch (e.g. `3.x`) and pull down the latest changes. |
| 32 | + 2. Create a tag for the new release: `git tag 3.x.x` |
| 33 | + 3. Push the tag to Github: `git push origin 3.x.x.` |
| 34 | + 4. Browse to https://github.com/pantheon-systems/terminus/actions where you can see a GitHub Actions workflow has kicked off. |
| 35 | + 5. This will create a release automatically with the PHAR attached from the start (which prevents a broken `self:update` gap period). |
| 36 | +
|
| 37 | +9. Once the release is published, edit the notes to include the changes from this release. It's convenient to copy the markdown from [https://github.com/pantheon-systems/terminus/edit/3.x/CHANGELOG.md](https://github.com/pantheon-systems/terminus/edit/3.x/CHANGELOG.md). Omit the release number and date when copying. |
| 38 | +
|
| 39 | +10. For releases `3.x` or later, a PR will be created in the [Homebrew formula](https://github.com/pantheon-systems/homebrew-external) repository. Take a look to it and merge it to release to Homebrew. |
| 40 | +
|
| 41 | +11. Update your major branch's version number to `a.b.c+1-dev`, where `a.b.c` is the latest release's version: |
| 42 | + 1. In `config/constants.yml`, change the value |
| 43 | + 2. In `CHANGELOG.md`, add a new heading above your most recent release. It should also be in the format of `a.b.c+1-dev`. |
| 44 | +
|
| 45 | +12. Open a PR against https://github.com/pantheon-systems/documentation to update [https://github.com/pantheon-systems/documentation/edit/main/source/content/terminus/10-supported-terminus.md](https://github.com/pantheon-systems/documentation/edit/main/source/content/terminus/10-supported-terminus.md). |
| 46 | + 1. Add the new **Version** at the top of the list. Fill in the **Release Date** with today's date. Leave the **EOL Date** blank. |
| 47 | + 2. For the most recent release on your major branch, fill in the **EOL Date**. This will be today's date plus one year. |
| 48 | + 3. If applicable, remove all but one old versions per major branch that are more than one year past EOL from the list. If some of the versions for a major branch have been removed from the list, the last line in the list should read `X.Y.Z or earlier`. |
| 49 | + 4. If applicable, update the Terminus [PHP Version Compatibility Matrix](https://docs.pantheon.io/terminus/supported-terminus#php-version-compatibility-matrix). |
| 50 | + 5. Create a new file in `source/releasenotes` for this release. You can use [this example](https://github.com/pantheon-systems/documentation/blob/main/source/releasenotes/2024-12-05-terminus-361.md?plain=1) as a starting point. |
| 51 | + 6. Set the PR title to `Terminus Release X.Y.Z` and do the following in the PR template: |
| 52 | + 1. Use this for your **Summary** section: |
| 53 | + `**[Version Updates](https://docs.pantheon.io/terminus/supported-terminus)** - Terminus Release X.Y.Z` |
| 54 | + 2. In the **Effect** section, add a link to your Terminus Release PR as the only bullet under **The following changes are already committed.** |
| 55 | + 3. Remove the **Remaining Work and Prerequisites** section. |
| 56 | + 4. In the **Release** section, fill the **When Ready** box with an `X` and remove the line **After date: $DATE.** |
| 57 | + 5. Create the PR as ready for approval (not a draft). |
| 58 | +
|
| 59 | +You can also use this as the contents for that PR description (remember to update the version and PR): |
| 60 | +
|
| 61 | +``` |
| 62 | +## Summary |
| 63 | + |
| 64 | +**[Supported Terminus and PHP Versions](https://docs.pantheon.io/terminus/supported-terminus)** - Include Terminus 3.6.1 |
| 65 | + |
| 66 | +Also, include new release note. |
| 67 | +``` |
| 68 | +
|
| 69 | +## See Also |
| 70 | +
|
| 71 | +[Terminus' Usage of Semantic Versioning](https://getpantheon.atlassian.net/wiki/spaces/VULCAN/pages/154438719) |
0 commit comments