Learn R Programming

releaser (version 1.2.1)

releaser-deprecated: Deprecated functions

Description

update_news_md modify the NEWS.md file of a package to replace the "Unreleased" section with a new version heading and update GitHub comparison links. get_changes extracts the section of NEWS.md corresponding to a given version.

Usage

update_news_md(path, version_number, verbose = TRUE)

get_changes(path, version_number, verbose = TRUE)

Value

update_news_md invisibly returns TRUE if the file was successfully updated. get_changes returns a character string containing the formatted changelog for the given version.

Arguments

path

[character] Path to the package root directory (or to the DESCRIPTION / NEWS.md file).

version_number

[character] Current version number string (e.g. "1.2.3").

verbose

[logical] Whether to print additional information (default: TRUE).

Details

The argument version_number is the new version number to update the changelog.

Examples

Run this code
if (FALSE) {
path_rjd3workspace <- file.path(tempdir(), "rjd3workspace")
file.copy(
    from = system.file("rjd3workspace", package = "releaser"),
    to = dirname(path_rjd3workspace),
    recursive = TRUE
)

update_news_md(path = path_rjd3workspace, version_number = "1.2.3")
}
if (FALSE) {
path_rjd3workspace <- system.file("rjd3workspace", package = "releaser")

get_changes(path = path_rjd3workspace, version_number = "Unreleased")
get_changes(path = path_rjd3workspace, version_number = "3.2.4")
get_changes(path = path_rjd3workspace, version_number = "3.5.1")
}

Run the code above in your browser using DataLab