updateme_sources_set {updateme} | R Documentation |
Configure updateme lookup of new package versions
Description
This function is a helper for setting the "updateme.sources"
global option. It provides a user-friendly interface and validation of the
options you set.
Usage
updateme_sources_set(...)
Arguments
... |
Named or unnamed arguments. Values should be either:
If arguments are named, names should indicate package which the option should apply to. If unnamed, the option will apply to all packages. See examples for more information. |
Value
The result of setting
options(updateme.sources = <new_options>)
Private Repositories
updateme supports packages installed from private repositories on GitHub and GitLab. To get upstream package version from either, you should only have to configure a personal access token (PAT):
For GitHub packages, updateme checks, in order:
The
GITHUB_PAT
environmental variableThe
GITHUB_TOKEN
environmental variableAny personal access tokens configured using
gitcreds::gitcreds_set()
For GitLab packages, updateme checks, in order:
The
GITLAB_PAT
environmental variableThe
GITLAB_TOKEN
environmental variableAny personal access tokens configured using
gitcreds::gitcreds_set()
See Also
updateme_on()
and updateme_off()
to disable updateme for all
packages
Examples
# If you want to check non-standard repos for new versions of packages,
# you'll first have to set the repos global option. Note that each
# option must be named for compatibility with updateme
old_repos <- options(repos = c(
# Your default CRAN mirror will likely be something like this
CRAN = "https://cloud.r-project.org",
# The r-lib r-universe, including dev versions of infrastructure packages
# like cli, rlang, etc
`r-lib` = "https://r-lib.r-universe.dev"
))
# 1. New versions will first be looked up from the r-lib R universe by default
# 2. If not found, they will be looked up from the usual CRAN mirror
# 3. dplyr will always be first looked up from GitHub
# 4. ggplot2 won't be looked up or notified about
old_updateme_sources <- updateme_sources_set(
"r-lib",
"CRAN",
dplyr = "https://github.com/tidyverse/dplyr", # Name is optional here
ggplot2 = NA
)
# memoise should now be looked up from the r-lib r-universe
if (interactive()) {
library(memoise)
}
# Restore old options
options(old_repos)
options(old_updateme_sources)