Skip to content

Commit

Permalink
Forwarding arguments to rhub::check() from check_rhub()
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle authored and jimhester committed May 28, 2019
1 parent 945c8d2 commit 75c8c23
Show file tree
Hide file tree
Showing 3 changed files with 14 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 (development version)

* `check_rhub` gains a new argument `build_args` for arguments passed to
`R CMD build`. `...` is now passed to `rhub::check_for_cran()`

* `test_file()` and `test_coverage_file()` now work with C
and C++ files in the src/ directory as well.

Expand Down
10 changes: 7 additions & 3 deletions R/r-hub.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
#' @param interactive whether to show the status of the build
#' interactively. R-hub will send an email to the package maintainer's
#' email address, regardless of whether the check is interactive or not.
#' @param ... extra arguments, passed to [pkgbuild::build()].
#' @param build_args Arguments passed to `R CMD build`
#' @param ... extra arguments, passed to [rhub::check_for_cran()].
#' @inheritParams check
#' @family build functions, rhub functions
#' @return a `rhub_check` object.
Expand All @@ -33,18 +34,21 @@ check_rhub <- function(pkg = ".",
platforms = NULL,
email = NULL,
interactive = TRUE,
build_args = NULL,
...) {
check_suggested("rhub")
pkg <- as.package(pkg)

built_path <- build(pkg$path, tempdir(), quiet = !interactive, ...)
built_path <- build(pkg$path, tempdir(), quiet = !interactive,
args = build_args)
on.exit(unlink(built_path), add = TRUE)

status <- rhub::check_for_cran(
path = built_path,
email = email,
platforms = platforms,
show_status = interactive
show_status = interactive,
...
)

if (!interactive) {
Expand Down
6 changes: 4 additions & 2 deletions man/check_rhub.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 75c8c23

Please # to comment.