-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (22 loc) · 620 Bytes
/
Makefile
File metadata and controls
26 lines (22 loc) · 620 Bytes
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
BINARY = getbin
.PHONY: build
build:
dep ensure
go build -o ${BINARY}
.PHONY: test
test:
go test -v ./...
.PHONY: run
run:
make build
./${BINARY}
.PHONY: release
release:
dep ensure
GOOS=linux GOARCH=amd64 go build -o build/${BINARY}-linux-amd64 .;
GOOS=darwin GOARCH=amd64 go build -o build/${BINARY}-darwin-amd64 .;
GOOS=windows GOARCH=amd64 go build -o build/${BINARY}-windows-amd64.exe .;
cd build; \
tar -zcvf ${BINARY}-linux-amd64.tar.gz ${BINARY}-linux-amd64; \
tar -zcvf ${BINARY}-darwin-amd64.tar.gz ${BINARY}-darwin-amd64; \
zip -r ${BINARY}-windows-amd64.exe.zip ${BINARY}-windows-amd64.exe;