debug
This commit is contained in:
parent
80a8db1ebb
commit
165e88a660
1 changed files with 21 additions and 8 deletions
|
|
@ -8,8 +8,6 @@ add_to_package_index <- function(
|
|||
bucket = "devxy-arm64-r-binaries",
|
||||
codename = NULL, r_minor_version = NULL,
|
||||
build_for_minor = FALSE) {
|
||||
cli::cli_h2("Building package index")
|
||||
|
||||
codename <- set_codename(codename)
|
||||
if (is.null(r_minor_version)) {
|
||||
r_minor_version <- sub("R version (\\d+\\.\\d+).*", "\\1", R.Version()$version.string)
|
||||
|
|
@ -40,15 +38,25 @@ add_to_package_index <- function(
|
|||
cranlike::add_PACKAGES(file_names, local_bin_dir)
|
||||
|
||||
cli::cli_alert("{.fun create_package_index}: Uploading PACKAGES* files to S3.")
|
||||
purrr::walk2(
|
||||
dummy <- purrr::walk2(
|
||||
sprintf("%s/%s", local_bin_dir, c("PACKAGES.db", "PACKAGES.rds", "PACKAGES.gz")),
|
||||
sprintf("%s/%s", remote_bin_dir, c("PACKAGES.db", "PACKAGES.rds", "PACKAGES.gz")),
|
||||
\(x, y) s3fs::s3_file_upload(x, y, overwrite = TRUE)
|
||||
)
|
||||
s3fs::s3_file_upload(sprintf("%s/PACKAGES", local_bin_dir), sprintf("%s/PACKAGES", remote_bin_dir), overwrite = TRUE)
|
||||
|
||||
pkgs_upload_local <- sprintf("%s/PACKAGES", local_bin_dir)
|
||||
pkgs_upload_remote <- sprintf("%s/PACKAGES", remote_bin_dir)
|
||||
|
||||
if (debug) {
|
||||
cli::cli_alert_danger("DEBUG: PACKAGES UPLOAD local dir: {pkgs_upload_local}")
|
||||
cli::cli_alert_danger("DEBUG: PACKAGES UPLOAD remote dir: {pkgs_upload_remote}")
|
||||
}
|
||||
|
||||
dummy <- s3fs::s3_file_upload(pkgs_upload_local, pkgs_upload_remote, overwrite = TRUE)
|
||||
# s3fs::s3_file_upload(
|
||||
# sprintf("%s/%s", local_bin_dir, c("PACKAGES", "PACKAGES.db", "PACKAGES.rds", "PACKAGES.gz")),
|
||||
# sprintf("%s", remote_bin_dir, c("PACKAGES", "PACKAGES.db", "PACKAGES.rds", "PACKAGES.gz")),
|
||||
# overwrite = TRUE
|
||||
# )
|
||||
return(invisible(TRUE))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue