Skip to content

Commit 612fafb

Browse files
ask first for merge and then for pull, otherwise you do not have the latest changes locally
1 parent b3dfcea commit 612fafb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/release.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ release_msg <- function(last_release, new_version) {
9898
#' @param tag The tag to push. `NULL` will derive the tag from `DESCRIPTION`.
9999
#' @keywords internal
100100
release_complete <- function(ask = TRUE, is_cran = ask, tag = NULL) {
101-
abort_if_not_yes("Are you on main branch with no changes in worktree?")
102-
if (git_branch_get() != "main") {
103-
rlang::abort("Must be on main to complete the release.")
104-
}
105101
if (ask) {
106102
abort_if_not_yes("Did you merge the release branch into main?")
107103
abort_if_not_yes("Did you pull the latest main from origin?")
108104
}
105+
abort_if_not_yes("Are you on main branch with no changes in worktree?")
106+
if (git_branch_get() != "main") {
107+
rlang::abort("Must be on main to complete the release.")
108+
}
109109
if (is_cran) {
110110
if (is.null(tag)) {
111111
tag <- paste0("v", desc::desc_get_version())

0 commit comments

Comments
 (0)