|
1 | | - |
2 | 1 | #' Run CRAN checks for package on R-hub |
3 | 2 | #' |
4 | | -#' It runs [build()] on the package, with the arguments specified |
5 | | -#' in `args`, and then submits it to the R-hub builder at |
6 | | -#' <https://builder.r-hub.io>. The `interactive` option controls |
7 | | -#' whether the function waits for the check output. Regardless, after the |
8 | | -#' check is complete, R-hub sends an email with the results to the package |
9 | | -#' maintainer. |
| 3 | +#' @description |
| 4 | +#' `r lifecycle::badge("deprecated")` |
10 | 5 | #' |
11 | | -#' @section About email validation on r-hub: |
12 | | -#' To build and check R packages on R-hub, you need to validate your |
13 | | -#' email address. This is because R-hub sends out emails about build |
14 | | -#' results. See more at [rhub::validate_email()]. |
| 6 | +#' This function is deprecated since the underlying function |
| 7 | +#' `rhub::check_for_cran()` is now deprecated and defunct. See [`rhub::rhubv2`] |
| 8 | +#' learn about the new check system, R-hub v2. |
15 | 9 | #' |
16 | | -#' @param platforms R-hub platforms to run the check on. If `NULL` |
17 | | -#' uses default list of CRAN checkers (one for each major platform, and |
18 | | -#' one with extra checks if you have compiled code). You can also specify |
19 | | -#' your own, see [rhub::platforms()] for a complete list. |
20 | | -#' @param email email address to notify, defaults to the maintainer |
21 | | -#' address in the package. |
22 | | -#' @param interactive whether to show the status of the build |
23 | | -#' interactively. R-hub will send an email to the package maintainer's |
24 | | -#' email address, regardless of whether the check is interactive or not. |
25 | | -#' @param build_args Arguments passed to `R CMD build` |
26 | | -#' @param ... extra arguments, passed to [rhub::check_for_cran()]. |
| 10 | +#' @param platforms R-hub platforms to run the check on. |
| 11 | +#' @param email email address to notify. |
| 12 | +#' @param interactive whether to show the status of the build. |
| 13 | +#' @param build_args Arguments passed to `R CMD build`. |
| 14 | +#' @param ... extra arguments, passed to `rhub::check_for_cran()`. |
27 | 15 | #' @inheritParams check |
28 | | -#' @family build functions |
29 | 16 | #' @return a `rhub_check` object. |
30 | | -#' |
| 17 | +#' @keywords internal |
31 | 18 | #' @export |
32 | | - |
33 | | -check_rhub <- function(pkg = ".", |
34 | | - platforms = NULL, |
35 | | - email = NULL, |
36 | | - interactive = TRUE, |
37 | | - build_args = NULL, |
38 | | - ...) { |
39 | | - rlang::check_installed("rhub") |
40 | | - pkg <- as.package(pkg) |
41 | | - |
42 | | - built_path <- build(pkg$path, tempdir(), quiet = !interactive, |
43 | | - args = build_args) |
44 | | - on.exit(file_delete(built_path), add = TRUE) |
45 | | - |
46 | | - check_dots_used(action = getOption("devtools.ellipsis_action", rlang::warn)) |
47 | | - |
48 | | - status <- rhub::check_for_cran( |
49 | | - path = built_path, |
50 | | - email = email, |
51 | | - platforms = platforms, |
52 | | - show_status = interactive, |
53 | | - ... |
54 | | - ) |
55 | | - |
56 | | - if (!interactive) { |
57 | | - cli::cli_inform(c(v = "R-hub check for package {.pkg {pkg$package}} submitted.")) |
58 | | - status |
59 | | - } else { |
60 | | - status |
61 | | - } |
| 19 | +check_rhub <- function( |
| 20 | + pkg = ".", |
| 21 | + platforms = NULL, |
| 22 | + email = NULL, |
| 23 | + interactive = TRUE, |
| 24 | + build_args = NULL, |
| 25 | + ... |
| 26 | +) { |
| 27 | + lifecycle::deprecate_stop("2.4.6", "check_rhub()") |
62 | 28 | } |
0 commit comments