check_rhubR Documentation

Verifies that the repository is on a clean, pushed git branch, optionally runs 'rhub::rhub_doctor()', and then launches 'rhub::rhub_check()' for the current branch using an explicit 'r-release' platform set by default.

Description

This helper intentionally does not create, push, or delete branches. Run it from the branch that should own the external release check.

Usage

check_rhub(
  root = ".",
  platforms = c("r-release-linux-x86_64", "r-release-macos-arm64",
    "r-release-macos-x86_64", "r-release-windows-x86_64"),
  allow_main = FALSE,
  run_doctor = TRUE,
  verbose = interactive(),
  git_runner = .run_process,
  doctor_fun = NULL,
  check_fun = NULL
)

Arguments

root

Repository root directory.

platforms

Character vector of rhub platform names. Defaults to 'c("r-release-linux-x86_64", "r-release-macos-arm64", "r-release-macos-x86_64", "r-release-windows-x86_64")'.

allow_main

Logical scalar. If 'FALSE', refuse to run from the repository's default branch when it can be detected.

run_doctor

Logical scalar. If 'TRUE', call 'rhub::rhub_doctor()' before 'rhub::rhub_check()'.

verbose

Logical scalar. If 'TRUE', emit progress messages.

git_runner

Function used to execute git child commands. This is primarily a test seam.

doctor_fun

Function used to run 'rhub::rhub_doctor()'. This is primarily a test seam.

check_fun

Function used to run 'rhub::rhub_check()'. This is primarily a test seam.

Details

When 'platforms' is left at its default, the helper runs 'r-release-linux-x86_64', 'r-release-macos-arm64', 'r-release-macos-x86_64', and 'r-release-windows-x86_64'. For the current full list of available platform names, see CRAN check flavors: <https://cran.r-project.org/web/checks/check_flavors.html>.

CLI entry point: './tools/check_rhub.R –help'

Value

A list describing the branch and upstream used for the rhub run.

Examples

## Not run: 
check_rhub()
check_rhub(platforms = c(
  "r-release-linux-x86_64",
  "r-release-windows-x86_64"
))
check_rhub(allow_main = TRUE)
check_rhub(run_doctor = FALSE)

## End(Not run)