Skip to content

Commit

Permalink
When checking build with manual = TRUE by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jimhester committed Oct 16, 2018
1 parent bc09641 commit 22ac85a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ you should switch your package to depend on **usethis** directly instead.

## Bugfixes and additional changes

* `check_win_*()` now build the package with `manual = TRUE` by default (#1890).

* `check()` output now works more nicely with recent changes to rcmdcheck (#1874).

* `reload()` now reloads loaded but not attached packages as well as attached ones.
Expand Down
28 changes: 20 additions & 8 deletions R/check-win.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,33 @@ build_win <- function(pkg = ".", version = c("R-devel", "R-release")) {

#' @describeIn check_win Check package on the development version of R.
#' @export
check_win_devel <- function(pkg = ".", args = NULL, quiet = FALSE, ...) {
check_win(pkg = pkg, version = "R-devel", args = args, quiet = quiet, ...)
check_win_devel <- function(pkg = ".", args = NULL, manual = TRUE, quiet = FALSE, ...) {
check_win(
pkg = pkg, version = "R-devel", args = args, manual = manual,
quiet = quiet, ...
)
}

#' @describeIn check_win Check package on the release version of R.
#' @export
check_win_release <- function(pkg = ".", args = NULL, quiet = FALSE, ...) {
check_win(pkg = pkg, version = "R-release", args = args, quiet = quiet, ...)
check_win_release <- function(pkg = ".", args = NULL, manual = TRUE, quiet = FALSE, ...) {
check_win(
pkg = pkg, version = "R-release", args = args, manual = manual,
quiet = quiet, ...
)
}

#' @describeIn check_win Check package on the previous major release version of R.
#' @export
check_win_oldrelease <- function(pkg = ".", args = NULL, quiet = FALSE, ...) {
check_win(pkg = pkg, version = "R-oldrelease", args = args, quiet = quiet, ...)
check_win_oldrelease <- function(pkg = ".", args = NULL, manual = TRUE, quiet = FALSE, ...) {
check_win(
pkg = pkg, version = "R-oldrelease", args = args, manual = manual,
quiet = quiet, ...
)
}

check_win <- function(pkg = ".", version = c("R-devel", "R-release", "R-oldrelease"),
args = NULL, quiet = FALSE, ...) {
args = NULL, manual = TRUE, quiet = FALSE, ...) {
pkg <- as.package(pkg)
version <- match.arg(version, several.ok = TRUE)

Expand All @@ -57,7 +66,10 @@ check_win <- function(pkg = ".", version = c("R-devel", "R-release", "R-oldrelea
}
}

built_path <- pkgbuild::build(pkg$path, tempdir(), args = args, quiet = quiet, ...)
built_path <- pkgbuild::build(pkg$path, tempdir(),
args = args,
manual = manual, quiet = quiet, ...
)
on.exit(unlink(built_path))

url <- paste0(
Expand Down

0 comments on commit 22ac85a

Please sign in to comment.