From 378f7678d806fd88767d062d9e7803d25d3e250f Mon Sep 17 00:00:00 2001 From: Barnaby Gray Date: Sat, 10 Sep 2016 09:27:17 +0100 Subject: [PATCH] Simpler versioning, only strip release exes --- Makefile | 19 +++++++++---------- main.go | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index fd5a2232..a74db565 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,7 @@ export GO15VENDOREXPERIMENT=1 -version := $(shell git describe --always --dirty 2>/dev/null || echo 0.8.2) exe = ./cmd/cli53 -buildargs = -ldflags '-w -s -X github.com/barnybug/cli53.version=${version}' +releaseargs = -ldflags '-w -s' .PHONY: all build install test coverage deps release @@ -14,18 +13,18 @@ deps: go get github.com/gucumber/gucumber/cmd/gucumber build: - go build -i -v $(buildargs) $(exe) + go build -i -v $(exe) install: - go install $(buildargs) $(exe) + go install $(exe) release: - GOOS=linux GOARCH=386 go build $(buildargs) -o release/cli53-linux-386 $(exe) - GOOS=linux GOARCH=amd64 go build $(buildargs) -o release/cli53-linux-amd64 $(exe) - GOOS=linux GOARCH=arm go build $(buildargs) -o release/cli53-linux-arm $(exe) - GOOS=darwin GOARCH=amd64 go build $(buildargs) -o release/cli53-mac-amd64 $(exe) - GOOS=windows GOARCH=386 go build $(buildargs) -o release/cli53-windows-386.exe $(exe) - GOOS=windows GOARCH=amd64 go build $(buildargs) -o release/cli53-windows-amd64.exe $(exe) + GOOS=linux GOARCH=386 go build $(releaseargs) -o release/cli53-linux-386 $(exe) + GOOS=linux GOARCH=amd64 go build $(releaseargs) -o release/cli53-linux-amd64 $(exe) + GOOS=linux GOARCH=arm go build $(releaseargs) -o release/cli53-linux-arm $(exe) + GOOS=darwin GOARCH=amd64 go build $(releaseargs) -o release/cli53-mac-amd64 $(exe) + GOOS=windows GOARCH=386 go build $(releaseargs) -o release/cli53-windows-386.exe $(exe) + GOOS=windows GOARCH=amd64 go build $(releaseargs) -o release/cli53-windows-amd64.exe $(exe) goupx release/cli53-linux-amd64 upx release/cli53-linux-386 release/cli53-linux-arm release/cli53-windows-386.exe cd release; sha256sum cli53-* > SHA256SUMS diff --git a/main.go b/main.go index cce7a2c8..306b8cc2 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,7 @@ import ( ) var r53 *route53.Route53 -var version = "undefined" /* passed in by Makefile */ +var version = "0.8.2" // Main entry point for cli53 application func Main(args []string) int {