From a444a4ef5360f38373719fe9479ab99fdc19c90b Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Mon, 30 Jan 2017 10:01:05 -0200 Subject: [PATCH] improve version regex --- pipeline/git/git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/git/git.go b/pipeline/git/git.go index fd04ce8e5..cdd62e67a 100644 --- a/pipeline/git/git.go +++ b/pipeline/git/git.go @@ -46,7 +46,7 @@ func (Pipe) Run(ctx *context.Context) (err error) { } // removes usual `v` prefix ctx.Version = strings.TrimPrefix(tag, "v") - if matches, err := regexp.MatchString("[0-9.]+", ctx.Version); !matches || err != nil { + if matches, err := regexp.MatchString("^[0-9.]+", ctx.Version); !matches || err != nil { return ErrInvalidVersionFormat{ctx.Version} } return