quiet pak
This commit is contained in:
parent
9b4ca10764
commit
6df5857b13
2 changed files with 25 additions and 27 deletions
|
|
@ -123,33 +123,6 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL,
|
|||
return(invisible(TRUE))
|
||||
}
|
||||
|
||||
#' @export
|
||||
install_package_system_dependencies <- function(package_name,
|
||||
tag,
|
||||
platform = "redhat-9",
|
||||
local_clone_dir) {
|
||||
cli::cli_alert_info("{.fun install_package_system_dependencies}: Cloning package {.pkg {package_name[1]}} with tag {.field {tag}}.")
|
||||
|
||||
local_clone_dir_single <- sprintf("%s/%s_%s", local_clone_dir, package_name[1], tail(tag, 1))
|
||||
|
||||
if (!dir.exists(local_clone_dir_single)) {
|
||||
system2("git", args = c(
|
||||
"clone", "-q", sprintf("--branch=%s", tail(tag, 1)),
|
||||
sprintf("https://github.com/cran/%s", package_name[1]), local_clone_dir_single
|
||||
))
|
||||
}
|
||||
|
||||
Sys.setenv(PKG_SYSREQS_PLATFORM = platform)
|
||||
Sys.setenv(PKG_SYSREQS = TRUE)
|
||||
Sys.setenv(PKG_SYSREQS_VERBOSE = TRUE)
|
||||
pak::local_install_dev_deps(sprintf("%s", local_clone_dir_single))
|
||||
|
||||
cli::cli_alert_info("{.fun install_package_system_dependencies}: 4. Removing {.path {local_clone_dir_single}}.")
|
||||
|
||||
unlink(sprintf("%s", local_clone_dir_single), recursive = TRUE, force = TRUE)
|
||||
}
|
||||
|
||||
|
||||
#' @importFrom cli cli_alert_info
|
||||
#' @importFrom pkgbuild build
|
||||
#' @export
|
||||
|
|
|
|||
25
R/install-deps.R
Normal file
25
R/install-deps.R
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#' @export
|
||||
install_package_system_dependencies <- function(package_name,
|
||||
tag,
|
||||
platform = "redhat-9",
|
||||
local_clone_dir) {
|
||||
cli::cli_alert_info("{.fun install_package_system_dependencies}: Cloning package {.pkg {package_name[1]}} with tag {.field {tag}}.")
|
||||
|
||||
local_clone_dir_single <- sprintf("%s/%s_%s", local_clone_dir, package_name[1], tail(tag, 1))
|
||||
|
||||
if (!dir.exists(local_clone_dir_single)) {
|
||||
system2("git", args = c(
|
||||
"clone", "-q", sprintf("--branch=%s", tail(tag, 1)),
|
||||
sprintf("https://github.com/cran/%s", package_name[1]), local_clone_dir_single
|
||||
))
|
||||
}
|
||||
|
||||
Sys.setenv(PKG_SYSREQS_PLATFORM = platform)
|
||||
Sys.setenv(PKG_SYSREQS = TRUE)
|
||||
Sys.setenv(PKG_SYSREQS_VERBOSE = TRUE)
|
||||
suppressMessages(pak::local_install_dev_deps(sprintf("%s", local_clone_dir_single)))
|
||||
|
||||
cli::cli_alert_info("{.fun install_package_system_dependencies}: 4. Removing {.path {local_clone_dir_single}}.")
|
||||
|
||||
unlink(sprintf("%s", local_clone_dir_single), recursive = TRUE, force = TRUE)
|
||||
}
|
||||
Loading…
Reference in a new issue