update_news: Update "NEWS.md"

View source: R/update_news.R

update_newsR Documentation

Update "NEWS.md"

Description

Create or update the "NEWS.md" file. It will include a template for new sections if relevant, and update the version number.

Usage

update_news(
  pkg = stringi::stri_extract_last_words(usethis::proj_path()),
  pkg_path = usethis::proj_path(),
  template = NULL
)

Arguments

pkg

[character(1)]
The package name. Defaults to stringi::stri_extract_last_words(usethis::proj_path()).

pkg_path

[character(1)]
The path to the package directory. Defaults to usethis::proj_path().

template

[character(1)]
The template to add to the "NEWS.md" file. Must be one of c("first", "develop"). Defaults to NULL.

Details

Default is template = NULL that will only update the version number. Use template = "first" to make the "NEWS.md" template for the first release of the package. Use template = "develop" to make the "NEWS.md" template for the successive releases of the package.

Value

None. Creates or updates the "NEWS.md" file in the package directory.

Author(s)

Petter Hopp Petter.Hopp@vetinst.no

Examples

## Not run: 
# Create the first "NEWS.md" file
library(NVIpackager)
update_news(template = "first")

## End(Not run)

PetterHopp/NVIpackager documentation built on Sept. 14, 2024, 1:24 a.m.