fix build metadata row selector

This commit is contained in:
Patrick Schratz 2024-07-31 12:54:37 +02:00
commit c87888beb5
Signed by: pat-s
GPG key ID: 3C6318841EF78925
2 changed files with 3 additions and 3 deletions

View file

@ -97,7 +97,7 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL,
# if for some reason an underlying error didnt' get caught in the tryCatch calls, we check again here for the existence of the binary file on disk and mark the build as failed if it is not found
tarball_name <- sprintf("%s_%s.tar.gz", x, y)
if (file.exists(sprintf("%s/%s", local_bin_path, tarball_name))) {
if (fs::file_exists(sprintf("%s/%s", local_bin_path, tarball_name))) {
store_build_metadata(x, y, platform, error_occurred = FALSE, force = force)
cli::cli_alert_success("Successfully built package {.pkg {x}} with tag {.field {y}}.")
} else {

View file

@ -19,8 +19,8 @@ store_build_metadata <- function(
} 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.")
DBI::dbExecute(con, "UPDATE single_builds SET build_timestamp = $1, error_occurred = $2, error = $3, platform = $4 WHERE package_name = $5 and tag = $6",
params = list(format(Sys.time(), "%Y-%m-%d %H:%M:%S"), error_occurred, error, platform, package_name, tag)
DBI::dbExecute(con, "UPDATE single_builds SET build_timestamp = $1, error_occurred = $2, error = $3, WHERE package_name = $5 and tag = $6 and platform = $7",
params = list(format(Sys.time(), "%Y-%m-%d %H:%M:%S"), error_occurred, error, package_name, tag, platform)
)
} else if (nrow(existing_entries) == 0) {
cli::cli_alert("{.fun store_build_metadata}: Storing build metadata for {.pkg {package_name}} {.field {tag}}.")