-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: Pull as part of finalize_version() #408
base: main
Are you sure you want to change the base?
Changes from all commits
be1c262
b178a9f
f05026a
eac44f3
6049af2
a812dc6
7b60767
1ab0c1c
41b4ffa
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 |
---|---|---|
@@ -1,12 +1,20 @@ | ||
#' @rdname finalize_version | ||
#' @usage NULL | ||
finalize_version_impl <- function(push, suggest_finalize = TRUE) { | ||
finalize_version_impl <- function(push, suggest_finalize = TRUE, pull) { | ||
#' @description | ||
#' 1. [commit_version()] | ||
force <- commit_version() | ||
#' 1. [tag_version()], setting `force = TRUE` if and only if `commit_version()` | ||
#' amended a commit. | ||
tag <- tag_version(force) | ||
#' 1. git pull with rebase if `pull = TRUE`. | ||
if (has_remote_branch(gert::git_branch()) && pull) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should |
||
# is the local branch behind? | ||
if (gert::git_ahead_behind()$behind > 0) { | ||
# With pull = TRUE we would fetch always and always uncommit + commit if behind master | ||
gert::git_pull(rebase = TRUE) | ||
} | ||
} | ||
#' 1. Force-pushes the created tag to the `"origin"` remote, if `push = TRUE`. | ||
if (push) { | ||
push_tag(tag, force = TRUE) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
actually the default should be FALSE I suppose