add archive_packages()

This commit is contained in:
Patrick Schratz 2024-08-30 00:57:49 +02:00
commit 7768d8a881
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -31,7 +31,11 @@ process_cran_updates <- function(
all_pkgs <- dplyr::bind_rows(updated_pkgs, new_pkgs)
purrr::walk2(all_pkgs$name, all_pkgs$version, ~ build_binary_package(.x, .y, platform = platform))
purrr::walk2(all_pkgs$name, all_pkgs$version, ~ {
build_binary_package(.x, .y, platform = platform)
archive_package(.x)
}
)
if (prune) {
removed_pkgs <- get_removed_cran_packages(interval)
@ -57,7 +61,7 @@ process_cran_updates <- function(
purrr::walk(removed_pkgs$name, ~ {
cli::cli_alert("{.fun process_cran_updates}: Removing package {.pkg {.x}} from S3.")
files_filtered <- grep(sprintf("%s_", .x), files, value = TRUE)
files_filtered <- grep(sprintf("/%s_", .x), files, value = TRUE)
if (length(files_filtered > 0)) {
s3fs::s3_file_delete(files_filtered)
cli::cli_alert_success("{.fun process_cran_updates}: Successfully removed {.pkg {basename(files_filtered)}} from S3.")