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 --tags
The release process for CRAN releases requires extra time and attention. A good place to start would be to
::desc()$del("Remotes")$write() desc
(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.
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. 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.
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.