Skip to content
Permalink
Browse files

Ensuring build/version numbers in goreleaser build

  • Loading branch information...
Depado committed Oct 23, 2018
1 parent 2ec76b6 commit 2297d8725873061a88daaef07eebf80ba59b1b31
Showing with 12 additions and 4 deletions.
  1. +8 −4 .goreleaser.yml
  2. +4 −0 Makefile
@@ -1,13 +1,17 @@
builds:
- env:
- CGO_ENABLED=0
goos: [linux]
goarch: [amd64, arm, arm64, 386]
- goarch: [amd64, arm, arm64, 386]
goarm: [6, 7]
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X "main.Version={{.Env.VERSION}}" -X "main.Build={{ .Env.BUILD }}"
archive:
wrap_in_directory: true
format: tar.gz
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
@@ -13,6 +13,10 @@ help:
build: ## Build
CGO_ENABLED=0 go build -o $(BINARY) $(LDFLAGS)

.PHONY: release
release: ## Create a new release on Github
VERSION=$(VERSION) BUILD=$(BUILD) goreleaser --snapshot

.PHONY: test
test: ## Run the test suite
go test ./...

0 comments on commit 2297d87

Please sign in to comment.
You can’t perform that action at this time.