pass down platform
This commit is contained in:
parent
9ddbfca4a4
commit
7bcd6fa166
1 changed files with 11 additions and 4 deletions
|
|
@ -9,7 +9,7 @@
|
|||
process_cran_updates <- function(
|
||||
package_name,
|
||||
tag,
|
||||
platform = platform,
|
||||
platform,
|
||||
local_clone_dir,
|
||||
interval = lubridate::today(),
|
||||
prune = TRUE,
|
||||
|
|
@ -24,12 +24,19 @@ process_cran_updates <- function(
|
|||
updated_pkgs <- get_updated_cran_packages(interval)
|
||||
new_pkgs <- get_new_cran_packages(interval)
|
||||
|
||||
cli::cli_alert_success("{.fun process_cran_updates}: Updated packages:")
|
||||
print(updated_pkgs)
|
||||
cli::cli_alert_success("{.fun process_cran_updates}: New packages:")
|
||||
print(new_pkgs)
|
||||
|
||||
all_pkgs <- dplyr::bind_rows(updated_pkgs, new_pkgs)
|
||||
|
||||
purrr::walk2(all_pkgs$name, all_pkgs$version, ~ build_binary_package(.x, .y))
|
||||
purrr::walk2(all_pkgs$name, all_pkgs$version, ~ build_binary_package(.x, .y, platform = platform))
|
||||
|
||||
if (prune) {
|
||||
removed_pkgs <- get_removed_cran_packages(interval)
|
||||
cli::cli_alert_success("{.fun process_cran_updates}: Removed packages:")
|
||||
print(removed_pkgs)
|
||||
|
||||
s3fs::s3_file_system(
|
||||
aws_access_key_id = Sys.getenv("AWS_ACCESS_KEY_ID"),
|
||||
|
|
@ -49,11 +56,11 @@ process_cran_updates <- function(
|
|||
files <- s3fs::s3_dir_ls(remote_bin_dir)
|
||||
|
||||
purrr::walk(removed_pkgs$name, ~ {
|
||||
cli::cli_alert("{.fun update_packages}: Removing package {.pkg {.x}} from S3.")
|
||||
cli::cli_alert("{.fun process_cran_updates}: Removing package {.pkg {.x}} from S3.")
|
||||
files_filtered <- grep("bold_", files, value = TRUE)
|
||||
s3fs::s3_file_delete_async(files_filtered)
|
||||
|
||||
cli::cli_alert_success("{.fun update_packages}: Successfully removed {.pkg {basename(files_filtered)}} from S3.")
|
||||
cli::cli_alert_success("{.fun process_cran_updates}: Successfully removed {.pkg {basename(files_filtered)}} from S3.")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue