forked from mercari/gaurun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (25 loc) · 1.24 KB
/
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
30
31
32
33
34
35
VERSION=0.9.1
TARGETS_NOVENDOR=$(shell glide novendor)
all: bin/gaurun bin/gaurun_recover
build-cross: cmd/gaurun/gaurun.go cmd/gaurun_recover/gaurun_recover.go gaurun/*.go
GOOS=linux GOARCH=amd64 go build -o bin/linux/amd64/gaurun-${VERSION}/gaurun cmd/gaurun/gaurun.go
GOOS=linux GOARCH=amd64 go build -o bin/linux/amd64/gaurun-${VERSION}/gaurun_recover cmd/gaurun_recover/gaurun_recover.go
GOOS=darwin GOARCH=amd64 go build -o bin/darwin/amd64/gaurun-${VERSION}/gaurun cmd/gaurun/gaurun.go
GOOS=darwin GOARCH=amd64 go build -o bin/darwin/amd64/gaurun-${VERSION}/gaurun_recover cmd/gaurun_recover/gaurun_recover.go
dist: build-cross
cd bin/linux/amd64 && tar zcvf gaurun-linux-amd64-${VERSION}.tar.gz gaurun-${VERSION}
cd bin/darwin/amd64 && tar zcvf gaurun-darwin-amd64-${VERSION}.tar.gz gaurun-${VERSION}
bin/gaurun: cmd/gaurun/gaurun.go gaurun/*.go
go build -o bin/gaurun cmd/gaurun/gaurun.go
bin/gaurun_recover: cmd/gaurun_recover/gaurun_recover.go gaurun/*.go
go build -o bin/gaurun_recover cmd/gaurun_recover/gaurun_recover.go
bin/gaurun_client: samples/client.go
go build -o bin/gaurun_client samples/client.go
bundle:
glide install
fmt:
@echo $(TARGETS_NOVENDOR) | xargs go fmt
check:
go test -v $(TARGETS_NOVENDOR)
clean:
rm -rf bin/*