improve detection for failed builds
This commit is contained in:
parent
632d5b4bbb
commit
0facfb0556
1 changed files with 11 additions and 4 deletions
|
|
@ -6,7 +6,7 @@
|
|||
#' @importFrom pkgbuild build
|
||||
#' @export
|
||||
build_binary_package <- function(package_name, tag = NULL, codename = NULL,
|
||||
r_version_minor = NULL, build_for_minor = TRUE,
|
||||
r_minor_version = NULL, build_for_minor = TRUE,
|
||||
local_build_root = "/root",
|
||||
local_clone_dir = "/tmp",
|
||||
platform = "redhat-9",
|
||||
|
|
@ -20,12 +20,12 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL,
|
|||
cli::cli_alert_warning("DEBUG: codename {codename}.")
|
||||
}
|
||||
|
||||
if (is.null(r_version_minor)) {
|
||||
r_version_minor <- sub("R version (\\d+\\.\\d+).*", "\\1", R.Version()$version.string)
|
||||
if (is.null(r_minor_version)) {
|
||||
r_minor_version <- sub("R version (\\d+\\.\\d+).*", "\\1", R.Version()$version.string)
|
||||
}
|
||||
|
||||
# create directory structure
|
||||
dir_out_bin <- set_bin_path(r_version_minor, build_for_minor, local_build_root, codename)
|
||||
dir_out_bin <- set_bin_path(r_minor_version, build_for_minor, local_build_root, codename)
|
||||
|
||||
if (debug) {
|
||||
cli::cli_alert_warning("DEBUG: dir_out_bin {dir_out_bin}.")
|
||||
|
|
@ -95,6 +95,7 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL,
|
|||
message(sprintf("Error in processing package %s with tag %s: %s", x, y, e))
|
||||
local_clone_dir_single <- sprintf("%s/%s_%s", local_clone_dir, x, y)
|
||||
unlink(local_clone_dir_single, force = TRUE, recursive = TRUE)
|
||||
# NB: this does not always work, which is why we are using the lack of build_duration as a secondary factor in store_metadata()
|
||||
store_build_metadata(x, y, platform, error_occurred = TRUE, force = force)
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue