Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (45 loc) · 1.65 KB
/
Copy pathMakefile
File metadata and controls
63 lines (45 loc) · 1.65 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
GOCACHE ?= $(CURDIR)/.cache/go-build
BIN_DIR ?= $(CURDIR)/bin
GATEWAY_BIN ?= $(BIN_DIR)/indexqube-gateway
IQ_BIN ?= $(BIN_DIR)/iq
.PHONY: dev fmt fmt-check vet test test-race bench alpha-check real-alpha control-smoke build build-gateway build-iq installer-test release-snapshot check clean
dev:
cd gateway && GOCACHE=$(GOCACHE) go run ./cmd/gateway
test:
cd gateway && GOCACHE=$(GOCACHE) go test ./...
test-race:
cd gateway && GOCACHE=$(GOCACHE) go test -race -count=1 ./...
vet:
cd gateway && GOCACHE=$(GOCACHE) go vet ./...
fmt:
cd gateway && gofmt -w .
fmt-check:
@unformatted="$$(cd gateway && gofmt -l .)"; \
if [ -n "$$unformatted" ]; then \
printf 'The following Go files need gofmt:\n%s\n' "$$unformatted"; \
exit 1; \
fi
bench:
cd gateway && GOCACHE=$(GOCACHE) go run ./cmd/iqbench
alpha-check:
bash scripts/manual_alpha_check.sh
real-alpha: build-iq
INDEXQUBE_ALPHA_CONFIRM=1 bash scripts/real_repo_alpha.sh $(CURDIR)
control-smoke: build-iq
bash scripts/control_plane_smoke.sh
build: build-gateway build-iq
build-gateway:
mkdir -p $(BIN_DIR)
cd gateway && GOCACHE=$(GOCACHE) go build -trimpath -o $(GATEWAY_BIN) ./cmd/gateway
build-iq:
mkdir -p $(BIN_DIR)
cd gateway && GOCACHE=$(GOCACHE) go build -trimpath -o $(IQ_BIN) ./cmd/iq
installer-test:
bash -n scripts/install.sh scripts/package_release.sh scripts/test_installer.sh scripts/real_repo_alpha.sh
PYTHONPYCACHEPREFIX=$(CURDIR)/.cache/pycache python3 -m py_compile scripts/reproducible_tar.py
bash scripts/test_installer.sh
release-snapshot:
bash scripts/package_release.sh dev $(CURDIR)/dist
check: fmt-check vet test build installer-test
clean:
rm -rf $(BIN_DIR) $(GOCACHE)