autodetect platform

This commit is contained in:
Patrick Schratz 2024-09-07 21:50:16 +02:00
commit 36d95cf5d9
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -19,6 +19,16 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL,
cli::cli_h2("Preparations ({.pkg {package_name}})")
codename <- set_codename(codename)
if (is.null(platform)) {
platform <- switch(codename,
"jammy" = "ubuntu",
"noble" = "ubuntu",
"rhel9" = "redhat",
"rhel8" = "redhat",
"alpine" = "alpine"
)
}
if (debug) {
cli::cli_alert_warning("DEBUG: codename {codename}.")
}