-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use release_bullets() in use_release_issue()
This is a bit of a hack because it assumes that the `release_bullets()` function is somewhere on the search path, but that's likely to be true because the developer will have usually called `load_all()` previously. Also includes some golden tests for release_bullets(). Fixes #941
- Loading branch information
Showing
5 changed files
with
134 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
|
||
First release | ||
============= | ||
|
||
> cat(release_checklist("0.1.0", on_cran = FALSE), sep = "\n") | ||
Prepare for release: | ||
|
||
* [ ] Check that description is informative | ||
* [ ] Check licensing of included files | ||
* [ ] `usethis::use_cran_comments()` | ||
* [ ] `devtools::check(remote = TRUE, manual = TRUE)` | ||
* [ ] `devtools::check_win_devel()` | ||
* [ ] `rhub::check_for_cran()` | ||
* [ ] Update `cran-comments.md` | ||
* [ ] Draft blog post | ||
|
||
Submit to CRAN: | ||
|
||
* [ ] `usethis::use_version('minor')` | ||
* [ ] `devtools::submit_cran()` | ||
* [ ] Approve email | ||
|
||
Wait for CRAN... | ||
|
||
* [ ] Accepted :tada: | ||
* [ ] `usethis::use_news_md()` | ||
* [ ] `usethis::use_github_release()` | ||
* [ ] `usethis::use_dev_version()` | ||
* [ ] Update install instructions in README | ||
* [ ] Finish blog post | ||
* [ ] Tweet | ||
* [ ] Add link to blog post in pkgdown news menu | ||
|
||
|
||
Patch release | ||
============= | ||
|
||
> cat(release_checklist("0.0.1", on_cran = TRUE), sep = "\n") | ||
Prepare for release: | ||
|
||
* [ ] Check [current CRAN check results](https://cran.rstudio.org/web/checks/check_results_usethis.html) | ||
* [ ] `devtools::check(remote = TRUE, manual = TRUE)` | ||
* [ ] `devtools::check_win_devel()` | ||
* [ ] `rhub::check_for_cran()` | ||
* [ ] `revdepcheck::revdep_check(num_workers = 4)` | ||
* [ ] Update `cran-comments.md` | ||
* [ ] [Polish NEWS](https://style.tidyverse.org/news.html#news-release) | ||
|
||
Submit to CRAN: | ||
|
||
* [ ] `usethis::use_version('patch')` | ||
* [ ] `devtools::submit_cran()` | ||
* [ ] Approve email | ||
|
||
Wait for CRAN... | ||
|
||
* [ ] Accepted :tada: | ||
* [ ] `usethis::use_news_md()` | ||
* [ ] `usethis::use_github_release()` | ||
* [ ] `usethis::use_dev_version()` | ||
|
||
|
||
Major release | ||
============= | ||
|
||
> cat(release_checklist("1.0.0", on_cran = TRUE), sep = "\n") | ||
Prepare for release: | ||
|
||
* [ ] Check [current CRAN check results](https://cran.rstudio.org/web/checks/check_results_usethis.html) | ||
* [ ] `devtools::check(remote = TRUE, manual = TRUE)` | ||
* [ ] `devtools::check_win_devel()` | ||
* [ ] `rhub::check_for_cran()` | ||
* [ ] `revdepcheck::revdep_check(num_workers = 4)` | ||
* [ ] Update `cran-comments.md` | ||
* [ ] [Polish NEWS](https://style.tidyverse.org/news.html#news-release) | ||
* [ ] Draft blog post | ||
|
||
Submit to CRAN: | ||
|
||
* [ ] `usethis::use_version('major')` | ||
* [ ] `devtools::submit_cran()` | ||
* [ ] Approve email | ||
|
||
Wait for CRAN... | ||
|
||
* [ ] Accepted :tada: | ||
* [ ] `usethis::use_news_md()` | ||
* [ ] `usethis::use_github_release()` | ||
* [ ] `usethis::use_dev_version()` | ||
* [ ] Finish blog post | ||
* [ ] Tweet | ||
* [ ] Add link to blog post in pkgdown news menu | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
test_that("release bullets don't change accidentally", { | ||
# Avoid finding any files in real usethis project | ||
old <- proj_set(dir_create(path_temp("usethis")), force = TRUE) | ||
on.exit(proj_set(old)) | ||
|
||
verify_output(test_path("test-release-usethis.txt"), { | ||
"# First release" | ||
cat(release_checklist("0.1.0", on_cran = FALSE), sep = "\n") | ||
|
||
"# Patch release" | ||
cat(release_checklist("0.0.1", on_cran = TRUE), sep = "\n") | ||
|
||
"# Major release" | ||
cat(release_checklist("1.0.0", on_cran = TRUE), sep = "\n") | ||
}) | ||
}) | ||
|
||
test_that("get extra news bullets if available", { | ||
standard <- release_checklist("1.0.0", TRUE) | ||
|
||
attach( | ||
list(release_bullets = function() "Extra bullets"), | ||
name = "extra", | ||
warn.conflicts = FALSE | ||
) | ||
on.exit(detach("extra")) | ||
|
||
new <- setdiff(release_checklist("1.0.0", TRUE), standard) | ||
expect_equal(new, "* [ ] Extra bullets") | ||
}) |