Skip to content

Commit

Permalink
ask first for merge and then for pull, otherwise you do not have the …
Browse files Browse the repository at this point in the history
…latest changes locally
  • Loading branch information
lorenzwalthert committed Jul 23, 2024
1 parent b3dfcea commit 612fafb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/release.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ release_msg <- function(last_release, new_version) {
#' @param tag The tag to push. `NULL` will derive the tag from `DESCRIPTION`.
#' @keywords internal
release_complete <- function(ask = TRUE, is_cran = ask, tag = NULL) {
abort_if_not_yes("Are you on main branch with no changes in worktree?")
if (git_branch_get() != "main") {
rlang::abort("Must be on main to complete the release.")
}
if (ask) {
abort_if_not_yes("Did you merge the release branch into main?")
abort_if_not_yes("Did you pull the latest main from origin?")
}
abort_if_not_yes("Are you on main branch with no changes in worktree?")
if (git_branch_get() != "main") {
rlang::abort("Must be on main to complete the release.")
}
if (is_cran) {
if (is.null(tag)) {
tag <- paste0("v", desc::desc_get_version())
Expand Down

0 comments on commit 612fafb

Please sign in to comment.