1
0
Fork 0
mirror of https://github.com/Luzifer/git-changerelease.git synced 2024-12-20 11:01:16 +00:00

Match only semver tags when searching for last version

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2017-05-31 11:48:13 +02:00
parent eb15e13613
commit 48a288bafa
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -140,7 +140,7 @@ func main() {
prepareRun()
// Get last tag
lastTag, err := gitSilent("describe", "--tags", "--abbrev=0")
lastTag, err := gitSilent("describe", "--tags", "--abbrev=0", `--match=v[0-9]*\.[0-9]*\.[0-9]*`)
// Fetch logs since last tag / since repo start
logArgs := []string{"log", `--format=` + gitLogFormat, "--abbrev-commit"}