imporove platform detection

This commit is contained in:
Patrick Schratz 2024-09-07 22:40:01 +02:00
commit e8f35ee392
Signed by: pat-s
GPG key ID: 3C6318841EF78925
2 changed files with 9 additions and 5 deletions

View file

@ -21,11 +21,11 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL,
if (is.null(platform)) { if (is.null(platform)) {
platform <- switch(codename, platform <- switch(codename,
"jammy" = "ubuntu", "jammy" = "ubuntu-2204",
"noble" = "ubuntu", "noble" = "ubuntu-2404",
"rhel9" = "redhat", "rhel9" = "redhat-9",
"rhel8" = "redhat", "rhel8" = "redhat-8",
"alpine" = "alpine" "alpine" = "alpine-320"
) )
} }

View file

@ -16,6 +16,10 @@ install_package_system_dependencies <- function(package_name,
)) ))
} }
if (grepl("alpine", platform)) {
platform <- "alpine"
}
cli::cli_alert("{.fun install_package_system_dependencies}: Installing R package dependencies for {.pkg {package_name[1]}} with tag {.field {tail(tag, 1)}}.") cli::cli_alert("{.fun install_package_system_dependencies}: Installing R package dependencies for {.pkg {package_name[1]}} with tag {.field {tail(tag, 1)}}.")
Sys.setenv(PKG_SYSREQS_PLATFORM = platform) Sys.setenv(PKG_SYSREQS_PLATFORM = platform)
Sys.setenv(PKG_SYSREQS = TRUE) Sys.setenv(PKG_SYSREQS = TRUE)