mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-24 04:16:27 +02:00
improve version regex
This commit is contained in:
parent
1c2221b2c5
commit
a444a4ef53
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user