cleanup and reorg
This commit is contained in:
parent
995ca841d6
commit
2e5939ace8
1 changed files with 103 additions and 68 deletions
|
|
@ -80,7 +80,13 @@ upload_package_index <- function(
|
|||
region_name = region,
|
||||
)
|
||||
|
||||
dummy <- purrr::walk2(
|
||||
pkg_count = length(s3fs::s3_dir_ls(remote_bin_dir)) - 4
|
||||
t1 <- Sys.time()
|
||||
cranlike::update_PACKAGES(remote_bin_dir)
|
||||
total_build_time <- round(Sys.time() - t1, 2)
|
||||
cli::cli_alert("Time updating PACKAGES index for {.field {pkg_count}} packages: {.strong {total_build_time} {units(difftime(Sys.time(), t1))}}.")
|
||||
|
||||
purrr::walk2(
|
||||
sprintf("%s/%s", local_bin_dir, c("PACKAGES", "PACKAGES.db", "PACKAGES.rds", "PACKAGES.gz")),
|
||||
sprintf("%s/%s", remote_bin_dir, c("PACKAGES", "PACKAGES.db", "PACKAGES.rds", "PACKAGES.gz")),
|
||||
\(x, y) s3fs::s3_file_upload(x, y, overwrite = TRUE)
|
||||
|
|
@ -89,10 +95,10 @@ upload_package_index <- function(
|
|||
pkgs_upload_local <- sprintf("%sPACKAGES", local_bin_dir)
|
||||
pkgs_upload_remote <- sprintf("%sPACKAGES", remote_bin_dir)
|
||||
|
||||
if (debug) {
|
||||
cli::cli_alert_warning("DEBUG: PACKAGES UPLOAD local dir: {pkgs_upload_local}")
|
||||
cli::cli_alert_warning("DEBUG: PACKAGES UPLOAD remote dir: {pkgs_upload_remote}")
|
||||
}
|
||||
# if (debug) {
|
||||
# cli::cli_alert_warning("DEBUG: PACKAGES UPLOAD local dir: {pkgs_upload_local}")
|
||||
# cli::cli_alert_warning("DEBUG: PACKAGES UPLOAD remote dir: {pkgs_upload_remote}")
|
||||
# }
|
||||
|
||||
# s3 <- paws.storage::s3(endpoint = endpoint, region = region)
|
||||
# s3$put_object(Body = pkgs_upload_local, Bucket = bucket, Key = "__linux__/rhel9/latest/src/contrib/PACKAGES")
|
||||
|
|
|
|||
Loading…
Reference in a new issue