From 5bd9432aa29f702a7ebdf1ea814477f39736e923 Mon Sep 17 00:00:00 2001 From: Svetlin Ralchev Date: Fri, 13 Dec 2019 06:10:27 +0000 Subject: [PATCH] Use Gorelease to publish new version --- .goreleaser.yml | 26 ++++++++++++++++++++++++++ cmd/parcello/main.go | 6 +++--- go.mod | 6 +++--- 3 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..1d5449f --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,26 @@ +before: + hooks: + - go mod download +builds: +- main: ./cmd/parcello/main.go + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' +brews: +- github: + owner: phogolabs + name: homebrew-tap + name: parcello + description: Golang Resource Bundler + homepage: https://github.com/phogolabs/parcello + test: | + system "#{bin}/parcello -v" diff --git a/cmd/parcello/main.go b/cmd/parcello/main.go index fc310c0..f3a8b53 100644 --- a/cmd/parcello/main.go +++ b/cmd/parcello/main.go @@ -14,8 +14,8 @@ import ( "github.com/phogolabs/parcello" ) -// Version represents the version number injected at compile time -var Version string = "unknown" +// version is injected by gorelease.com +var version string = "unknown" const ( // ErrCodeArg is returned when an invalid argument is passed to CLI @@ -28,7 +28,7 @@ func main() { HelpName: "parcello", Usage: "Golang Resource Bundler and Embedder", UsageText: "parcello [global options]", - Version: Version, + Version: version, Writer: os.Stdout, ErrWriter: os.Stderr, Action: run, diff --git a/go.mod b/go.mod index 6062c6c..1dfcc87 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/daaku/go.zipexe v1.0.1 github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 github.com/mattn/go-sqlite3 v1.11.0 - github.com/onsi/ginkgo v1.8.0 - github.com/onsi/gomega v1.5.0 - github.com/phogolabs/cli v0.0.0-20191007115343-b45b57e5579e + github.com/onsi/ginkgo v1.10.3 + github.com/onsi/gomega v1.7.1 + github.com/phogolabs/cli v0.0.0-20191212161310-ce689d871370 )