Parts of this document is adapted for The Hubverse from The Carpentries Developer’s Handbook (c) The Carpentries under the CC-BY 4.0 license.
Release Checklist
-
# example: create a signed (-s) tag for version 3.3.3 git tag -s v3.3.3 -m '<short explanation of what changed>' git push --tags
Release to CRAN
The release process for CRAN releases requires extra time and attention. A good place to start would be to
-
-
desc::desc()$del("Remotes")$write()
(DO NOT COMMIT, you will restore this later with
git restore DESCRIPTION
).
Post Release Checklist
Immediately after the release, follow these steps to set the version back to development
Subsequent PR Checklist
Subsequent PRs are business-as-usual development. All PRs are tested against the development versions of packages and must work before being merged.
It is important to remember that PRs should focus on independent features. If you want add a new feature and fix a bug, these should be two separate PRs. This strategy reduces the size of the PR, making it easier to review.
Caveats:
- You should not change the development version number, unless there are important feature changes that are required by an upstream package (see more about the development version number).
- Review often brings up potential non-blocking features/bug fixes that are orthogonal to the original PR. In these cases, instead of creating a PR to merge into the original PR, it’s best to create a new issue from the PR review and, after merging, create a new PR to fix that issue. This helps keep disparate bugfixes and features separate.
- If introducing breaking changes, you must not merge into
main
until these changes have been tested and communicated with the community.
Hotfix Checklist
A hotfix is a bug fix that is independent from in-development features and needs to be deployed within a day. Details on hotfixes can be found in vignette("hotfixes", package = "hubDevs")
. To patch and release a hotfix, follow this protocol:
-
(main)$ git switch --detach 0.14.0 # checkout the tag ((0.14.0))$ git switch -c znk/hotfix/143 # create a new branch (znk/hotfix/143)$
-
(znk/hotfix/143)$ git commit -m 'hotfix for #143' (znk/hotfix/143)$ git push -u origin znk/hotfix/143 # push the hotfix
-
(znk/hotfix/143)$ git commit -m 'bump version to 0.14.1' (znk/hotfix/143)$ git tag -s 0.14.1 -m 'flipped retroencabulator switch option' (znk/hotfix/143)$ git push (znk/hotfix/143)$ git push --tags
At this point, there will be a conflict on the NEWS and DESCRIPTION, but that’s because you confirmed that it worked in the previous step.