diff --git a/genny/release/options.go b/genny/release/options.go index 33eccf4..7e00f29 100644 --- a/genny/release/options.go +++ b/genny/release/options.go @@ -15,7 +15,7 @@ type Options struct { VersionFile string LegacyPackr bool SkipPackr bool - semVersion *semver.Version + semVersion semver.Version // add your stuff here } @@ -30,10 +30,8 @@ func (opts *Options) Validate() error { if len(opts.Version) == 0 { opts.Version = "v0.0.1" } - if !strings.HasPrefix(opts.Version, "v") { - opts.Version = "v" + opts.Version - } - v, err := semver.NewVersion(opts.Version) + + v, err := semver.NewVersion(strings.TrimPrefix(opts.Version, "v")) if err != nil { return err } diff --git a/go.mod b/go.mod index c629ac2..e04c10c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/gobuffalo/release go 1.12 require ( - github.com/Masterminds/semver v1.4.2 + github.com/Masterminds/semver v1.4.3-0.20190829202958-e21c53f7d696 github.com/gobuffalo/envy v1.7.0 github.com/gobuffalo/genny v0.3.0 github.com/gobuffalo/here v0.2.3 diff --git a/go.sum b/go.sum index 72f91fa..97c0f9f 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver v1.4.3-0.20190829202958-e21c53f7d696 h1:OqELdiOlY8GBlSvZ1FA8pVR2EbVZjoPD54HeujJgbkc= +github.com/Masterminds/semver v1.4.3-0.20190829202958-e21c53f7d696/go.mod h1:8CV7kYbvgykQs8Io0EDPxUVkQQsXveUpKzLB6tuHV2w= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= diff --git a/version.go b/version.go index 456864c..e28485e 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package main // Version of main -const Version = "v1.9.0" +const Version = "1.10.0"