forked from mercari/gaurun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (22 loc) · 1.25 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
VERSION=0.11.0
all: bin/gaurun bin/gaurun_recover
build-cross: cmd/gaurun/gaurun.go cmd/gaurun_recover/gaurun_recover.go gaurun/*.go
GO111MODULE=on GOOS=linux GOARCH=amd64 go build -o bin/linux/amd64/gaurun-${VERSION}/gaurun cmd/gaurun/gaurun.go
GO111MODULE=on GOOS=linux GOARCH=amd64 go build -o bin/linux/amd64/gaurun-${VERSION}/gaurun_recover cmd/gaurun_recover/gaurun_recover.go
GO111MODULE=on GOOS=darwin GOARCH=amd64 go build -o bin/darwin/amd64/gaurun-${VERSION}/gaurun cmd/gaurun/gaurun.go
GO111MODULE=on 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
GO111MODULE=on go build -o bin/gaurun cmd/gaurun/gaurun.go
bin/gaurun_recover: cmd/gaurun_recover/gaurun_recover.go gaurun/*.go
GO111MODULE=on go build -o bin/gaurun_recover cmd/gaurun_recover/gaurun_recover.go
bin/gaurun_client: samples/client.go
GO111MODULE=on go build -o bin/gaurun_client samples/client.go
fmt:
go fmt ./...
check:
GO111MODULE=on go test -v ./...
clean:
rm -rf bin/*