You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
finalize_version() currently pushes to the main branch. Can we come up with a good workflow to support protected branches, i.e. if we want to disallow pushing things straight to production?
The text was updated successfully, but these errors were encountered:
Currently, bump_version() fails for non-main branch:
library(fledge)
with_demo_project(quiet=TRUE, {
usethis::use_r("bla")
gert::git_add("R/bla.R")
gert::git_commit("* Ad cool bla.")
gert::git_branch_create("bump")
bump_version()
})
#> Error in `check_main_branch()` at fledge/R/bump-version.R:6:2:#> ! ✖ Must be on the main branch (main) for running fledge functions.#> ℹ Currently on branch bump.
Added an argument to bump_version() to skip this check.
To avoid race conditions and incomplete NEWS.md files, we need to rethink how fledge operates in the scenario of protected branches. We need to separate the tagging (which can be made an almost atomic operation that is very likely to succeed) from creating NEWS.md, and do the tagging first. The new workflow would be:
Tagging
Create a rich tag with the most recent news
Thin about already bumping the version in DESCRIPTION
finalize_version()
currently pushes to the main branch. Can we come up with a good workflow to support protected branches, i.e. if we want to disallow pushing things straight to production?The text was updated successfully, but these errors were encountered: