|
1 | 1 | #' Release package to CRAN. |
2 | 2 | #' |
3 | | -#' Run automated and manual tests, then post package to CRAN. |
4 | | -#' |
5 | | -#' The package release process will: |
6 | | -#' |
7 | | -#' * Confirm that the package passes `R CMD check` on relevant platforms |
8 | | -#' * Confirm that important files are up-to-date |
9 | | -#' * Build the package |
10 | | -#' * Submit the package to CRAN, using comments in "cran-comments.md" |
11 | | -#' |
12 | | -#' You can add arbitrary extra questions by defining an (un-exported) function |
13 | | -#' called `release_questions()` that returns a character vector |
14 | | -#' of additional questions to ask. |
| 3 | +#' @description |
| 4 | +#' `r lifecycle::badge("deprecated")` |
15 | 5 | #' |
16 | | -#' You also need to read the CRAN repository policy at |
17 | | -#' 'https://cran.r-project.org/web/packages/policies.html' and make |
18 | | -#' sure you're in line with the policies. `release` tries to automate as |
19 | | -#' many of polices as possible, but it's impossible to be completely |
20 | | -#' comprehensive, and they do change in between releases of devtools. |
| 6 | +#' `release()` is deprecated in favour of [usethis::use_release_issue()]. |
| 7 | +#' We no longer feel confident recommrding `release()` because we don't use it |
| 8 | +#' ourselves, so there's no guarantee that it will track best practices as |
| 9 | +#' they evolve over time. |
21 | 10 | #' |
22 | 11 | #' @template devtools |
23 | 12 | #' @param check if `TRUE`, run checking, otherwise omit it. This |
|
29 | 18 | #' tasks that you can use in addition to or in place of `release`. |
30 | 19 | #' @export |
31 | 20 | release <- function(pkg = ".", check = FALSE, args = NULL) { |
| 21 | + lifecycle::deprecate_warn( |
| 22 | + "2.5.0", |
| 23 | + "release()", |
| 24 | + "usethis::use_release_issue()" |
| 25 | + ) |
32 | 26 | pkg <- as.package(pkg) |
33 | 27 | # Figure out if this is a new package |
34 | 28 | cran_version <- cran_pkg_version(pkg$package) |
@@ -159,6 +153,10 @@ find_release_questions <- function(pkg = ".") { |
159 | 153 | } |
160 | 154 |
|
161 | 155 | yesno <- function(msg, .envir = parent.frame()) { |
| 156 | + if (!rlang::is_interactive()) { |
| 157 | + cli::cli_abort("Called from non-interactive context.") |
| 158 | + } |
| 159 | + |
162 | 160 | yeses <- c( |
163 | 161 | "Yes", |
164 | 162 | "Definitely", |
|
0 commit comments