Skip to content

Commit

Permalink
require to be on release candidate branch for cran release
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzwalthert committed Mar 25, 2024
1 parent 7955554 commit 2cc612a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/release.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,14 @@ release_prechecks <- function(bump, is_cran) {
dsc <- desc::description$new()
suppressMessages(dsc$bump_version(bump))
new_version <- paste0("v", dsc$get_version())
if (is_cran) {
release_branch <- paste0("rc-", new_version)
if (!(release_branch %in% git2r::branches())) {
rlang::abort(paste0("need to be on branch", release_branch))
}
}
abort_if_not_yes("Your target release has version {new_version}, correct?")
abort_if_not_yes("Did you prepare NEWS.md for this version ({new_version})?")
abort_if_not_yes("Did you commit NEWS.md for this version ({new_version})?")
dsc
}

Expand Down

0 comments on commit 2cc612a

Please sign in to comment.