forked from gliderlabs/glidergun
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
29 lines (23 loc) · 904 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
NAME=glidergun
BINARYNAME=gun
ARCH=$(shell uname -m)
VERSION=0.0.7
build:
go-bindata include
mkdir -p build/Linux && GOOS=linux go build -ldflags "-X main.Version $(VERSION)" -o build/Linux/$(BINARYNAME)
mkdir -p build/Darwin && GOOS=darwin go build -ldflags "-X main.Version $(VERSION)" -o build/Darwin/$(BINARYNAME)
install: build
install build/$(shell uname -s)/gun /usr/local/bin
deps:
go get -u github.com/jteeuwen/go-bindata/...
go get -u github.com/progrium/gh-release/...
go get || true
release:
rm -rf release && mkdir release
tar -zcf release/$(NAME)_$(VERSION)_Linux_$(ARCH).tgz -C build/Linux $(BINARYNAME)
tar -zcf release/$(NAME)_$(VERSION)_Darwin_$(ARCH).tgz -C build/Darwin $(BINARYNAME)
gh-release checksums sha256
gh-release create gliderlabs/$(NAME) $(VERSION) $(shell git rev-parse --abbrev-ref HEAD) v$(VERSION)
clean:
rm -rf build release
.PHONY: build release