-
Notifications
You must be signed in to change notification settings - Fork 12
feat: Add function to check whether all versions are git-tagged #404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8a2d46a
5d1367f
482856b
0b4ffce
3f75d39
26b7107
25d5413
6cd1a7e
ab97e81
090503d
3e85bee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,23 @@ | ||||||||
| #' Check whether all versions NEWS.md have been git-tagged | ||||||||
| #' | ||||||||
| #' @return `NULL` | ||||||||
| #' | ||||||||
|
||||||||
| #' | |
| #' | |
| #' @export |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| untagged_versions <- versions[!(versions %in% tags)] | |
| untagged_versions <- setdiff(versions, tags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the package imports cli so this should use cli::cli_warn() and cli pluralization. https://cli.r-lib.org/reference/pluralization.html
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||
| # Create mock package in a temporary directory. | ||||
| with_demo_project({ | ||||
| # Use functions as if inside the newly created package project. | ||||
| # (Or go and actually run code inside the newly created package project!) | ||||
| # Add a new R file. | ||||
| usethis::use_r("cool-function", open = FALSE) | ||||
| # Pretend we added useful code inside it. | ||||
| # Track the new R file with Git. | ||||
| gert::git_add("R/cool-function.R") | ||||
| gert::git_commit("- Add cool function.") | ||||
| # Bump version with fledge. | ||||
| fledge::bump_version() | ||||
| fledge::update_news(c("- something I forgot", "- blabla")) | ||||
| fledge::update_version() | ||||
|
||||
| fledge::update_version() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # check_tags | ||
|
|
||
| Code | ||
| check_tags() | ||
| Condition | ||
| Warning: | ||
| Version with no corresponding tags: 0.0.0.9000. | ||
| Output | ||
| NULL | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| test_that("check_tags", { | ||
| skip_if_not_installed("rlang", "1.0.1") | ||
| skip_if_not_installed("testthat", "3.1.2") | ||
|
|
||
| local_demo_project(quiet = TRUE) | ||
| expect_snapshot(check_tags()) | ||
| shut_up_fledge(tag_version()) | ||
| expect_null(expect_silent(check_tags())) | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title/description text is grammatically off: “all versions NEWS.md” is missing “in” (i.e., “all versions in NEWS.md”). Since
man/check_tags.Rdis generated from this roxygen block, fix the wording here and re-run roxygen so the Rd stays in sync.