Learn R Programming

releaser (version 1.0.0)

change_remotes_field: Change the Remotes field in DESCRIPTION

Description

Update the Remotes field of a package DESCRIPTION file so that dependencies point to specific development targets (develop, snapshot, or main).

Usage

change_remotes_field(
  path,
  target = c("develop", "snapshot", "main"),
  verbose = TRUE
)

Value

Invisibly returns the new vector of remote specifications (character).

Arguments

path

[character] Path to the package root directory.

target

[character] Target branch or type of remote: must be one of "develop", "snapshot", or "main".

verbose

[logical] Whether to print current and new remote fields (default: TRUE).

Examples

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

change_remotes_field(path = path_rjd3workspace, target = "develop")

Run the code above in your browser using DataLab