forked from mosco/crossing-probability
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_r_pkg.R
More file actions
21 lines (20 loc) · 795 Bytes
/
build_r_pkg.R
File metadata and controls
21 lines (20 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
list.of.packages <- c("lintr", "covr", "pkgbuild", "roxygen2", "Rcpp", "testthat")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
# lintr::use_lintr(type = "tidyverse")
system2("autoreconf")
Rcpp::compileAttributes()
devtools::document(roclets = c('rd', 'collate', 'namespace'))
l <- lintr::lint_package()
print(l)
stopifnot(length(l)==0)
check_res <- devtools::check()
stopifnot(max(sapply(check_res[c("errors", "warnings", "notes")], length))==0)
devtools::install()
cov <- covr::package_coverage()
print(cov)
stopifnot(covr::percent_coverage(cov)==100)
#covr::report(cov)
devtools::build_manual(path = "build")
devtools::build(path = "build")
devtools::build(path = "build", binary = TRUE)