Skip to content

Commit

Permalink
Move submit check to submit_cran()
Browse files Browse the repository at this point in the history
Fixes #1228
  • Loading branch information
hadley committed Aug 2, 2017
1 parent a3c014f commit b2f9d59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# devtools 1.13.3.9000

* `submit_cran()` now checks that you're ready to submit, since this is a
potentially expensive operation (#1228)

* `check()` defaults to running `document()` only if you have used
roxygen previously (#1437).

Expand Down
10 changes: 5 additions & 5 deletions R/release.r
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,7 @@ release <- function(pkg = ".", check = TRUE, args = NULL, spelling = "en_US") {
if (yesno("Is your email address ", maintainer(pkg)$email, "?"))
return(invisible())

built_path <- build_cran(pkg, args = args)
if (yesno("Ready to submit?"))
return(invisible())

upload_cran(pkg, built_path)
submit_cran(pkg, args = args)

if (uses_git(pkg$path)) {
message("Don't forget to tag the release when the package is accepted!")
Expand Down Expand Up @@ -266,6 +262,10 @@ cran_submission_url <- "http://xmpalantir.wu.ac.at/cransubmit/index2.php"
#' @export
#' @keywords internal
submit_cran <- function(pkg = ".", args = NULL) {
if (yesno("Ready to submit to CRAN?"))
return(invisible())

pkg <- as.package(pkg)
built_path <- build_cran(pkg, args = args)
upload_cran(pkg, built_path)
}
Expand Down

0 comments on commit b2f9d59

Please # to comment.