mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-30 04:50:45 +02:00
refactor: remove an unneeded condition
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
297615b9b7
commit
efe8b7089e
@ -432,14 +432,11 @@ type gitChangeloger struct{}
|
||||
|
||||
func (g gitChangeloger) Log(ctx *context.Context) (string, error) {
|
||||
args := []string{"log", "--pretty=oneline", "--no-decorate", "--no-color"}
|
||||
prev, current := ctx.Git.PreviousTag, ctx.Git.CurrentTag
|
||||
if current == "" {
|
||||
current = ctx.Git.Commit
|
||||
}
|
||||
// if prev is empty, it means we don't have a previous tag, so we don't
|
||||
// pass any more args, which should everything.
|
||||
// if current is empty, it shouldn't matter, as it will then log
|
||||
// `{prev}..`, which should log everything from prev to HEAD.
|
||||
prev, current := ctx.Git.PreviousTag, ctx.Git.CurrentTag
|
||||
if prev != "" {
|
||||
args = append(args, fmt.Sprintf("%s..%s", prev, current))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user