Skip to content

Commit

Permalink
Use version name as part of binary release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
longsleep committed May 23, 2017
1 parent 28b27cd commit 811ab54
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,25 @@ binary-%: generate
-X main.Version=$(VERSION) \
-X main.BuildStamp=$(BUILDSTAMP) \
" \
-o bin/realtimetrafficd-$(GOARCH) realtimetrafficd/*.go
-o bin/realtimetrafficd_$(GOARCH) realtimetrafficd/*.go

binary: binary-$(GOARCH)
mv bin/realtimetrafficd-$(GOARCH) bin/realtimetrafficd
cp -va bin/realtimetrafficd_$(GOARCH) bin/realtimetrafficd

build: goget binary

$(DIST)/realtimetrafficd-%: binary-$(GOARCH)
$(DIST)/realtimetrafficd-$(VERSION)_%: binary-$(GOARCH)
@mkdir -p $(DIST)
if [ -n "$(UPX)" ]; then UPX= $(UPX) -f --brute -o $@ bin/realtimetrafficd-$(GOARCH); else cp -v bin/realtimetrafficd-$(GOARCH) $@; fi
if [ -n "$(UPX)" ]; then UPX= $(UPX) -f --brute -o $@ bin/realtimetrafficd_$(GOARCH); else cp -va bin/realtimetrafficd_$(GOARCH) $@; fi

release-amd64:
$(MAKE) GOARCH=amd64 $(DIST)/realtimetrafficd-amd64
$(MAKE) GOARCH=amd64 $(DIST)/realtimetrafficd-$(VERSION)_amd64

release-armhf:
$(MAKE) GOARCH=arm GOARM=7 $(DIST)/realtimetrafficd-armhf
$(MAKE) GOARCH=arm GOARM=7 $(DIST)/realtimetrafficd-$(VERSION)_armhf

release-arm64:
$(MAKE) GOARCH=arm64 $(DIST)/realtimetrafficd-arm64
$(MAKE) GOARCH=arm64 $(DIST)/realtimetrafficd-$(VERSION)_arm64

release: release-amd64 release-armhf release-arm64

Expand Down

0 comments on commit 811ab54

Please sign in to comment.