The following sections show how to combine these functions at different stages with any R package on GitHub. All {fledge} commands should be issued from the package directory of the target R package.
{fledge} assumes that the target R package is version-controlled with Git in a dedicated repository. The following steps are required to set up {fledge} for first time use, with your package.
Call bump_version()
as given below to set the package version
fledge::bump_version()
Edit NEWS.md
if required (typo fixes, rephrasing, grouping).
Call finalize_version()
as given below to update NEWS.md
fledge::finalize_version()
You are all set to switch to the development stage now.
Ensure that you use bullet points (*
or -
) in your commit or merge messages to indicate the messages that you want to include in NEWS.md
.
Use finalize_version(push = TRUE)
to push to the remote repository (e.g. GitHub) in one swoop.
{fledge} aims to update NEWS.md
and DESCRIPTION
correctly whenever a new version is assigned.
In order to do this, the following steps need to be included throughout the development workflow.
In commit messages to your main branch (typically main
or master
), mark everything that should go to NEWS.md
with a bullet point (-
or *
).
This is applicable to single commits, merge commits, or squash commits from pull requests.
Do not edit NEWS.md
manually.
When you want to assign a version number to the current state of your R package e.g. at the end of the day or before a break, call
r
fledge::bump_version()
The default argument for bump_version is "dev". So the dev part of the version number will be updated. It is good practice to assign a new version number before switching focus to another project.
Edit NEWS.md
if required (typo fixes, rephrasing, grouping).
Call finalize_version()
: fledge::finalize_version()
. This achieves the following:
NEWS.md
is now composed, based on the most recent commit messages.
To understand how NEWS.md
is updated by fledge, see the section on NEWS.md
implementation.usethis::use_version()
).NEWS.md
messages included in the tag's message.When you want to release your package to CRAN, follow the steps below:
Call bump_version() with the appropriate argument ("patch"
, "major"
, "minor"
). e.g.,
r
fledge::bump_version("patch")
Edit NEWS.md
, convert the "change log" to "release notes" -- a higher-level description of features and bug fixes (typo fixes, rephrasing, grouping).
Call commit_version()
as below
r
fledge::commit_version()
Make any necessary adjustments before releasing to CRAN depending on results of preparatory / incoming checks.
Once the release/changes have been accepted by CRAN, use the following calls to tag the released version and to switch to a development version immediately.
fledge::tag_version()
fledge::bump_version()
Return to development mode!
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.