Skip to content

Commit

Permalink
Install before building pkgdown, closes #89
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Sep 13, 2018
1 parent e383b2e commit 9e2ccdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
9 changes: 3 additions & 6 deletions R/steps-pkgdown.R
Expand Up @@ -9,15 +9,12 @@ BuildPkgdown <- R6Class(
},

run = function() {
# Don't need to be super-strict when building pkgdown
withr::with_libpaths(
super$get_lib(), action = "prefix",
do.call(pkgdown::build_site, c(list(preview = FALSE), private$pkgdown_args))
)
remotes::install_local(".")
do.call(pkgdown::build_site, c(list(preview = FALSE), private$pkgdown_args))
},

prepare = function() {
verify_install("pkgdown")
verify_install(c("pkgdown", "remotes"))
super$prepare()
}
),
Expand Down
7 changes: 2 additions & 5 deletions R/steps-rcmdcheck.R
Expand Up @@ -8,15 +8,12 @@ TicStepWithPackageDeps <- R6Class(
verify_install("remotes")

remotes::install_deps(dependencies = TRUE)
utils::update.packages(lib.loc = self$get_lib()[[1]], ask = FALSE)
},

get_lib = function() {
# Using a separate library for "build dependencies"
# (which might well be ahead of CRAN)
# works very poorly with custom steps that are not aware
# of this shadow library.
.libPaths()
utils::update.packages(ask = FALSE)
}
),
)
Expand All @@ -35,7 +32,7 @@ RCMDcheck <- R6Class(
},

run = function() {
res <- rcmdcheck::rcmdcheck(args = private$args, libpath = super$get_lib())
res <- rcmdcheck::rcmdcheck(args = private$args)

print(res)
if (length(res$errors) > 0) {
Expand Down

0 comments on commit 9e2ccdf

Please sign in to comment.