-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (21 loc) · 572 Bytes
/
Makefile
File metadata and controls
28 lines (21 loc) · 572 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
27
28
BINARY=es-query-csv
VERSION=v1.6.3
BUILD_TIME=`date +%FT%T%z`
GOX_OSARCH="darwin/amd64 darwin/arm64 linux/386 linux/amd64 windows/386 windows/amd64"
default: build
clean:
rm -rf ./bin
build:
CGO_ENABLED=0 \
go build -a -o ./bin/${BINARY}-${VERSION} *.go
build-linux:
CGO_ENABLED=0 \
GOARCH=amd64 \
GOOS=linux \
go build -ldflags "-X main.Version=${VERSION}" -a -o ./bin/${BINARY}-${VERSION} *.go
build-gox:
gox -ldflags "-X main.Version=${VERSION}" -osarch=${GOX_OSARCH} -output="bin/${VERSION}/{{.Dir}}_{{.OS}}_{{.Arch}}"
deps:
dep ensure;
test:
go test