add debug arg

This commit is contained in:
Patrick Schratz 2024-09-23 22:08:27 +02:00
commit 2ad67854d4
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -81,7 +81,7 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL,
t1 <- Sys.time()
cli::cli_h2("Building ({.pkg {package_name[1]}})")
cli::cli_alert("[{format(Sys.time(), format='%H:%M:%S')}] Building binaries for {.pkg {package_name[1]}} with tags {.field {tag}}.")
cli::cli_alert("[{format(Sys.time(), format='%H:%M:%S')}] Building binaries for {.pkg {package_name[1]}} with tags {.field {tag}}.")
future::plan(future_strategy,
workers = future_workers,
@ -127,25 +127,24 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL,
total_build_time <- round(Sys.time() - t1, 2)
cli::cli_alert("Execution time ({.pkg {package_name[1]}}) ({length(tag)} tags): {.strong {total_build_time} {units(difftime(Sys.time(), t1))}}.")
cli::cli_h2("Uploading ({.pkg {package_name[1]}})")
# out <- progressr::with_progress({
# p <- progressr::progressor(along = tag)
# future.apply::future_mapply(function(x, y) {
mapply(function(x, y) {
tryCatch(
{
p()
dump <- upload_single_binary_to_s3(package_name = x, tag = y, force = force, build_for_minor = build_for_minor, debug = debug)
},
error = function(e) {
message(sprintf("Error in uploading package %s with tag %s: %s", x, y, e))
}
)
# p <- progressr::progressor(along = tag)
# future.apply::future_mapply(function(x, y) {
mapply(function(x, y) {
tryCatch(
{
# p()
dump <- upload_single_binary_to_s3(package_name = x, tag = y, force = force, build_for_minor = build_for_minor, debug = debug)
},
error = function(e) {
message(sprintf("Error in uploading package %s with tag %s: %s", x, y, e))
}
)
# }, package_name, tag, future.seed = TRUE)
})
if (archive) {
archive_package(package_name[1])
archive_package(package_name[1], debug = debug)
}
return(invisible(TRUE))
}