-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-package.R
executable file
·55 lines (45 loc) · 1.82 KB
/
build-package.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Build package
# Test package #####################################################################################
# install.packages("rgeos", dependencies = TRUE)
# install.packages("Matrix", dependencies = TRUE)
# Dependencies
update(remotes::package_deps(packages = "pedometrics"))
update(remotes::package_deps(packages = "devtools"))
# Reverse dependency tools
devtools::revdep("pedometrics-package/")
# Render README
rmarkdown::render("pedometrics-package/README.Rmd")
# RCpp
# Avoid error
# Error in dyn.load(dllfile) :
# unable to load shared object <...>.so
Rcpp::compileAttributes("pedometrics-package/")
# check documentation ----
roxygen2::roxygenise("pedometrics-package/")
devtools::check_man("pedometrics-package/")
spelling::spell_check_package("pedometrics-package/")
# spelling::update_wordlist()
# check examples ----
devtools::run_examples("pedometrics-package/")
# check for Linux (local) ----
devtools::check("pedometrics-package/",
env_vars = c(`_R_CHECK_DEPENDS_ONLY_` = TRUE))
devtools::check("pedometrics-package/",
document = TRUE, manual = TRUE, vignettes = TRUE, force_suggests = TRUE, incoming = TRUE,
remote = TRUE)
# check for Windows (remote) ----
devtools::check_win_devel("pedometrics-package/")
devtools::check_win_release("pedometrics-package/")
devtools::check_win_oldrelease("pedometrics-package/")
# check in R-hub ----
# rhub::validate_email(email = "alessandrosamuelrosa@gmail.com")
# rhub::check_on_windows()
# rhub::platforms()
platforms <- c("fedora-clang-devel",
"ubuntu-gcc-release", "debian-clang-devel", "windows-x86_64-devel")
devtools::check_rhub("pedometrics-package/",
platforms = platforms, interactive = FALSE, env_vars = c(`_R_CHECK_FORCE_SUGGESTS_` = "false"))
# upload to CRAN ----
# devtools::build()
devtools::release("pedometrics-package/", check = FALSE)
devtools::load_all()