-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathrelease_script.R
More file actions
138 lines (102 loc) · 3.08 KB
/
Copy pathrelease_script.R
File metadata and controls
138 lines (102 loc) · 3.08 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Steps/Commands to run before a CRAN release -----------------------------
#usethis::use_release_issue(version = version)
gert::git_pull()
urlchecker::url_check()
## Update dependencies
pak::local_install_deps(dependencies = TRUE)
## Update internal data files
source("data-raw/data-index.R")
source("data-raw/data-raw.R")
source("data-raw/metadata.R")
## Documentation
# Update NEWS
file.edit("NEWS.md")
# Check spelling
dict <- hunspell::dictionary('en_CA')
devtools::spell_check()
spelling::update_wordlist()
# Check URLS
urlchecker::url_check()
# Check test coverage
#covr::report()
# Update README.Rmd
devtools::build_readme()
# Update Contributors
allcontributors::add_contributors()
## Update codemeta
codemetar::write_codemeta()
# Precompile Vignettes - BUILD PACKAGE FIRST!
source("vignettes/precompile.R")
## Build site (so website uses newest version)
## Update website
## BUILD PACKAGE FIRST!
#pkgdown::build_articles(lazy = TRUE)
# pkgdown::build_home()
# pkgdown::build_news()
# pkgdown::build_reference()
#pkgdown::build_articles(lazy = FALSE)
pkgdown::build_site(lazy = FALSE)
## Checks
# Run WITH and WITHOUT internet
devtools::run_examples(run_donttest = TRUE)
devtools::test()
# Local tests
devtools::check(cran = FALSE, manual = TRUE, run_dont_test = TRUE)
devtools::check(
cran = FALSE,
manual = TRUE,
args = c("--no-examples", "--no-tests")
) # Quick re-check as needed
devtools::check_win_devel()
# Finalize -------------------------------------------------
## Merge when ready!
usethis::pr_view()
## Once merged close branch
usethis::pr_finish()
## Once it is released create signed release on github
usethis::use_github_release()
## Prep for next
usethis::pr_init("dev")
usethis::use_dev_version()
usethis::pr_push()
# Good practices --------------------
goodpractice::gp()
# Build package to check on Rhub and locally
system("cd ..; R CMD build weathercan")
#system(paste0("cd ..; R CMD check weathercan_", version, ".tar.gz --as-cran --run-donttest")) # Local
# Check Windows
rhub::check_for_cran(
path = paste0("../weathercan_", version, ".tar.gz"),
check_args = "--as-cran --run-donttest",
platforms = c(
"windows-x86_64-oldrel",
"windows-x86_64-devel",
"windows-x86_64-release"
),
show_status = FALSE
)
## env_vars=c(R_COMPILE_AND_INSTALL_PACKAGES = "always"))
# Check debian
rhub::check_for_cran(
path = paste0("../weathercan_", version, ".tar.gz"),
check_args = "--as-cran --run-donttest",
platforms = c(
"debian-clang-devel",
"debian-gcc-devel", # CRAN = r-devel-linux-x86_64-debian-gcc
"debian-gcc-patched",
"debian-gcc-release"
), # CRAN = r-patched-linux-x86_64),
show_status = FALSE
)
# Check fedora
rhub::check_for_cran(
path = paste0("../weathercan_", version, ".tar.gz"),
check_args = "--as-cran",
platforms = c("fedora-clang-devel", "fedora-gcc-devel"), # CRAN = r-devel-linux-x86_64-fedora-gc
env_vars = c("_R_CHECK_FORCE_SUGGESTS_" = "false"),
show_status = FALSE
)
## Once it is released create signed release on github
usethis::use_github_release()
# Prep for next
usethis::use_dev_version()