From 48a288bafa1e6e8a54e979ecb3552d521dda7dd5 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 31 May 2017 11:48:13 +0200 Subject: [PATCH] Match only semver tags when searching for last version Signed-off-by: Knut Ahlers --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index e6ce001..9197b8d 100644 --- a/main.go +++ b/main.go @@ -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"}