update_dev_pkg: Perform update of development version of a package

View source: R/devel.R

update_dev_pkgR Documentation

Perform update of development version of a package

Description

Downloads and installs latest development version, only when a new commit is available. Defaults are set to update data.table, other packages can be used as well. Repository of a package has to include git commit SHA information in PACKAGES file.

Usage

update_dev_pkg(pkg="data.table",
       repo="https://Rdatatable.gitlab.io/data.table",
       field="Revision", type=getOption("pkgType"), lib=NULL, ...)

Arguments

pkg

character scalar, package name.

repo

character scalar, url of package devel repository.

field

character scalar, metadata field to use in PACKAGES file and DESCRIPTION file, default "Revision".

type

character scalar, default getOption("pkgType"), used to define if package has to be installed from sources, binaries or both.

lib

character scalar, library location where package is meant to be upgraded.

...

passed to install.packages.

Details

In case if a devel repository does not provide binaries user will need development tools installed for package compilation, like Rtools on Windows, or alternatively eventually set type="source".

Value

Invisibly TRUE if package was updated, otherwise FALSE.

data.table repositories

By default the function uses our GitLab-hosted R repository at https://Rdatatable.gitlab.io/data.table. This repository is updated nightly. It runs multiple test jobs (on top of GitHub tests jobs run upstream) and publish the package (sources and binaries), even if GitLab test jobs are failing. Status of GitLab test jobs can be checked at Package Check Results.
We also publish bleeding edge version of the package on GitHub-hosted R repository at https://Rdatatable.gitlab.io/data.table (just minor change in url from lab to hub). GitHub version should be considered less stable than GitLab one. It publishes only package sources.
There are also other repositories maintained by R community, for example https://rdatatable.r-universe.dev. Those can be used as well, but as they are unlikely to provide git commit SHA, the function will install the package even if latest version is already installed.

Note

Package namespace is unloaded before attempting to install newer version.

See Also

data.table

Examples


  if (FALSE) data.table::update_dev_pkg()

Rdatatable/data.table documentation built on Dec. 21, 2024, 3:08 a.m.