Skip to content

Commit 48a288b

Browse files
committed
Match only semver tags when searching for last version
Signed-off-by: Knut Ahlers <knut@ahlers.me>
1 parent eb15e13 commit 48a288b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func main() {
140140
prepareRun()
141141

142142
// Get last tag
143-
lastTag, err := gitSilent("describe", "--tags", "--abbrev=0")
143+
lastTag, err := gitSilent("describe", "--tags", "--abbrev=0", `--match=v[0-9]*\.[0-9]*\.[0-9]*`)
144144

145145
// Fetch logs since last tag / since repo start
146146
logArgs := []string{"log", `--format=` + gitLogFormat, "--abbrev-commit"}

0 commit comments

Comments
 (0)