Help with Preparing a New Version of an R Package

Helps to prepare a release. Before releasing an R package it is important to update the DESCRIPTION file and the changelog. This package prepares these files and also updates the versions according to the branches. It relies heavily on the 'desc' packages.


{releaser}

CRANstatus

R-CMD-check Testcoverage CodeFactor muttest CodacyBadge lint

GH Pagesbuilt

{releaser} helps the developer to release their package and update informations (DESCRIPTION, CHANGELOG…) of the package.

Installation

You can install the development version of {releaser} from GitHub with:

# install.packages("remotes")
remotes::install_github("TanguyBarthelemy/releaser")

Usage

library("releaser")

You can extract the latest version of a package on GitHub and display the different future version:

version <- get_latest_version("r-lib/usethis", verbose = FALSE)
#> Fetched DESCRIPTION from branch: v3.2.2
#> Version found on branch v3.2.2: 3.2.2
#> Fetched DESCRIPTION from branch: agent-prompt-detection
#> Version found on branch agent-prompt-detection: 3.2.2.9000
#> Fetched DESCRIPTION from branch: agents-update
#> Version found on branch agents-update: 3.2.1.9000
#> Fetched DESCRIPTION from branch: claude-revdep
#> Version found on branch claude-revdep: 3.2.1.9000
#> Fetched DESCRIPTION from branch: drop-base-imports
#> Version found on branch drop-base-imports: 3.2.1.9000
#> Fetched DESCRIPTION from branch: f-check-installed-later
#> Version found on branch f-check-installed-later: 2.2.2.9000
#> Fetched DESCRIPTION from branch: feature/rhub-rchk
#> Version found on branch feature/rhub-rchk: 3.2.1.9000
#> Fetched DESCRIPTION from branch: fork-cleanup
#> Version found on branch fork-cleanup: 3.2.1.9000
#> Fetched DESCRIPTION from branch: general-github-file
#> Version found on branch general-github-file: 3.2.2.9000
#> Fetched DESCRIPTION from branch: main
#> Version found on branch main: 3.2.2.9000
#> Fetched DESCRIPTION from branch: pkgdown-v3.1.0
#> Version found on branch pkgdown-v3.1.0: 3.1.0
#> Fetched DESCRIPTION from branch: shields-io-experiment
#> Version found on branch shields-io-experiment: 2.1.5.9000
get_different_future_version(version)
#> Future patch version: 3.2.3
#> Future minor version: 3.3.0
#> Future major version: 4.0.0
#> current_version.Version    future_patch_version    future_minor_version 
#>                 "3.2.2"                 "3.2.3"                 "3.3.0" 
#>    future_major_version 
#>                 "4.0.0"

Release workflow

The recommended order when preparing a release is:

# 1. Align the dependencies with the package code (requires {attachment})
amend_description(path = ".")

# 2. Point the Remotes field to the desired branch
change_remotes_field(path = ".", target = "develop")

# 3. Bump the versions of the rjdverse dependencies
set_latest_rjdverse_version(path = ".")

amend_description() must be called before the remotes and version pin steps: attachment::att_amend_desc() keeps the remotes of the packages it finds in the code and drops the others.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("releaser")

1.3.0 by Tanguy Barthelemy, 8 days ago


https://github.com/TanguyBarthelemy/releaser, https://tanguybarthelemy.github.io/releaser/


Report a bug at https://github.com/TanguyBarthelemy/releaser/issues


Browse source code at https://github.com/cran/releaser


Authors: Tanguy Barthelemy [aut, cre, art, cph]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports gh, desc, base64enc, attachment, roxygen2

Suggests spelling, testthat


See at CRAN