set_remotes_to_desc: Add Remotes field to DESCRIPTION based on your local...

View source: R/set_remotes.R

set_remotes_to_descR Documentation

Add Remotes field to DESCRIPTION based on your local installation

Description

Add Remotes field to DESCRIPTION based on your local installation

Usage

set_remotes_to_desc(path.d = "DESCRIPTION", stop.local = FALSE, clean = TRUE)

Arguments

path.d

path to description file.

stop.local

Logical. Whether to stop if package was installed from local source. Message otherwise.

clean

Logical. Whether to clean all existing remotes before run.

Value

Used for side effect. Adds Remotes field in DESCRIPTION file.

Examples

tmpdir <- tempfile(pattern = "setremotes")
dir.create(tmpdir)
file.copy(system.file("dummypackage", package = "attachment"), tmpdir,
 recursive = TRUE)
dummypackage <- file.path(tmpdir, "dummypackage")
# Add remotes field if there are Remotes locally
att_amend_desc(dummypackage) %>%
  set_remotes_to_desc()

# Clean temp files after this example
unlink(tmpdir, recursive = TRUE)

## Not run: 
# For your current package
att_amend_desc() %>%
  set_remotes_to_desc()

## End(Not run)

attachment documentation built on July 2, 2024, 1:07 a.m.