-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (31 loc) · 935 Bytes
/
Makefile
File metadata and controls
43 lines (31 loc) · 935 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
export GO111MODULE=on
LDFLAGS = -X github.com/brimdata/zync/cmd/zync/version.version=$(VERSION)
VERSION = $(shell git describe --always --dirty --tags)
fmt:
@res=$$(go fmt ./...); \
if [ -n "$${res}" ]; then \
echo "go fmt failed on these files:"; echo "$${res}"; echo; \
exit 1; \
fi
tidy:
@go mod tidy
@git diff --exit-code -- go.mod go.sum
vet:
@go vet ./...
test-unit:
@go test -short ./...
test-system: build deps/zed
@ZTEST_PATH='$(PWD)/dist:$(PWD)/deps:$(PATH)' go test -tags=ztests ./ztests
deps/zed: go.mod
@GOBIN="$(CURDIR)/deps" go install \
github.com/brimdata/zed/cmd/zed@$$(go list -f {{.Version}} -m github.com/brimdata/zed)
build:
@mkdir -p dist
@go build -ldflags='$(LDFLAGS)' -o dist ./cmd/...
install:
@go install -ldflags='$(LDFLAGS)' ./cmd/...
clean:
@rm -rf dist
localzq:
@go mod edit -replace=github.com/brimsec/zq=../zq
.PHONY: vet tidy test-unit test-system clean build localzq