1.7 KiB
1.7 KiB
README
Workflow
01-prepare.sh- Install R interpreter
- Add required repos to resolve syslibs
- Install pak
- Install awscli for remote s3 sync
02-build-binaries.sh- For every package, do
- Clone from GitHub CRAN mirror
- Install all system dependencies via
pak::local_install_dev_deps() - Checkout each available tag
- Build source package
- Build binary package
- Create Archive/ directory
- Move all versions besides the most recent one to Archive/ (for source and binary)
- Create
PACKAGESmetadata file usingcranlikepackage
- For every package, do
03-upload.sh- Sync all binaries and sources to S3 bucket
-4-create-archive-rds.sh- Create
Meta/archive.rdsfile for each package so thatremotes::install_version()can install archived versions - Upload
Meta/archive.rdsto S3 bucket
- Create
Support for archived versions
remotes::install_version()
remotes::install_version() is searching for a Meta/archive.rds file in the /src/contrib directory.
This file must be a list of dataframes containing the information about the archived versions of the package.
Example:
con <- gzcon(url(sprintf("%s/src/contrib/Meta/archive.rds",
c("CRAN" = "https://cloud.r-project.org")), "rb"))
foo = readRDS(con)
foo[[1]]
pak::pak(package@version)
pak searches for Archive/<package> and is able to install all versions existing there.
Ensure to use a clean cache if other repos have been used before, i.e. call pak::meta_clean(force = TRUE) if in doubt or when testing.
Lessons learned
- Newer R versions have issues compiling C code from older package Versions. Using an older R version to build the binaries is recommended.