skip upload if file does not exist locally

This commit is contained in:
Patrick Schratz 2024-07-27 21:24:44 +02:00
commit f888e4aa86
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -19,6 +19,11 @@ upload_single_binary_to_s3 <- function(
local_bin_path <- set_bin_path(r_minor_version, build_for_minor, local_build_root = local_build_root, codename)
remote_bin_path <- set_bin_path(r_minor_version, build_for_minor, local_build_root = bucket, codename)
if (!file.exists(sprintf("%s/%s", local_bin_path, tarball_name))) {
cli::cli_alert("{.fun upload_single_binary_to_s3}: File {.pkg {package_name}} {.field {tag}} does not exist locally - skipping upload.")
return(TRUE)
}
if (debug) {
cli::cli_alert_warning("DEBUG: local_bin_path: {local_bin_path}")
cli::cli_alert_warning("DEBUG: remote_bin_path: {remote_bin_path}")