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.
# 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 --tagsThe 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).
Immediately after the release, follow these steps to set the version back to development
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.
TIP: 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.
Caveats:
main until these changes have been tested and communicated with the community.A hotfix is a bug fix that is independent from in-development features and needs to be deployed within a day. Refer to the Hubverse documentation for details about hotfixes.
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 --tagsAt 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.
This describes an edge case (after development of cross-package functionality).
Effectively, if you have two packages that have complementary features in two pull requests, you can test them in the pull request by changing the Remotes: field.
For example, a branch pkgA@feature-A1 depends onpkgB@feature-B1, so you would do the following steps:
org/pkgB@feature-B1 the Remotes: field of pkgA@feature-A1 (and bump the development version number in pkgB@feature-B1) during development.pkgB@feature-B1 should be merged before pkgA@feature-A1.pkgA@feature-A1, you should ensure that the Remotes: removes the feature branch specification.