-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathprepare_for_cran.R
38 lines (28 loc) · 950 Bytes
/
prepare_for_cran.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
# Prepare for CRAN ----
# from https://github.com/ThinkR-open/prepare-for-cran
# Update dependencies in DESCRIPTION
attachment::att_amend_desc()
# Run tests and examples
devtools::test()
devtools::run_examples()
# autotest::autotest_package(test = TRUE)
# Check package as CRAN
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"))
# Check content
remotes::install_github("ThinkR-open/checkhelper")
checkhelper::find_missing_tags()
# Check spelling
# usethis::use_spell_check()
spelling::spell_check_package()
# Check URL are correct
# remotes::install_github("r-lib/urlchecker")
urlchecker::url_check()
urlchecker::url_update()
# Update NEWS
# Bump version manually and add list of changes
# Add comments for CRAN
usethis::use_cran_comments(open = rlang::is_interactive())
# Upgrade version number
usethis::use_version(which = c("patch", "minor", "major", "dev")[1])
# Verify you're ready for release, and release
devtools::release()