improved logging for uploads
This commit is contained in:
parent
e8f35ee392
commit
1fe3e92fe2
2 changed files with 3 additions and 3 deletions
|
|
@ -17,7 +17,7 @@ store_build_metadata <- function(
|
|||
if (nrow(existing_entries) >= 1 && !force) {
|
||||
cli::cli_alert("{.fun store_build_metadata}: Build metadata for {.field {.pkg {package_name}}} {.field {tag}} already exists.")
|
||||
} else if (nrow(existing_entries) >= 1 && force) {
|
||||
cli::cli_alert_info("{.fun store_build_metadata}: Force overwriting build metadata for {.pkg {package_name}} {.field {tag}} because {.code force = TRUE} was set.")
|
||||
cli::cli_alert_info("{.fun store_build_metadata}: Force overwriting build metadata for {.pkg {package_name}} {.field {tag}} ({platform}) because {.code force = TRUE} was set.")
|
||||
|
||||
DBI::dbExecute(con, "UPDATE single_builds SET build_timestamp = $1, error_occurred = $2, error = $3, build_duration = $4, size = $5 WHERE package_name = $6 and tag = $7 and platform = $8",
|
||||
params = list(format(Sys.time(), "%Y-%m-%d %H:%M:%S"), error_occurred, error, build_duration, size, package_name, tag, platform)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ upload_single_binary_to_s3 <- function(
|
|||
exists <- s3fs::s3_file_exists(sprintf("%s/%s", remote_bin_path, tarball_name))
|
||||
|
||||
if ((!exists && !force) || (!exists && force)) {
|
||||
cli::cli_alert("{.fun upload_single_binary_to_s3}: Uploading {.pkg {package_name}} {.field {tag}} to S3.")
|
||||
cli::cli_alert("{.fun upload_single_binary_to_s3}: Uploading {.pkg {package_name}} {.field {tag}} to {.path {sprintf('%s/%s', remote_bin_path, tarball_name)}}.")
|
||||
s3fs::s3_file_upload(
|
||||
sprintf("%s/%s", local_bin_path, tarball_name),
|
||||
sprintf("%s/%s", remote_bin_path, tarball_name)
|
||||
|
|
@ -50,7 +50,7 @@ upload_single_binary_to_s3 <- function(
|
|||
cli::cli_alert("{.fun upload_single_binary_to_s3}: Deleting binary for {.pkg {package_name}} {.field {tag}} at path {.path {sprintf('%s/%s', local_bin_path, tarball_name)}}.")
|
||||
file.remove(sprintf("%s/%s", local_bin_path, tarball_name))
|
||||
} else if (exists && force) {
|
||||
cli::cli_alert_info("{.fun upload_single_binary_to_s3}: Force uploading package {.pkg {package_name}} {.field {tag}} because {.code force = TRUE} was set.")
|
||||
cli::cli_alert_info("{.fun upload_single_binary_to_s3}: Force uploading package {.pkg {package_name}} {.field {tag}} to {.path {sprintf('%s/%s', remote_bin_path, tarball_name)}} because {.code force = TRUE} was set.")
|
||||
s3fs::s3_file_upload(
|
||||
sprintf("%s/%s", local_bin_path, tarball_name),
|
||||
sprintf("%s/%s", remote_bin_path, tarball_name),
|
||||
|
|
|
|||
Loading…
Reference in a new issue