Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (51 loc) · 1.64 KB
/
Copy pathMakefile
File metadata and controls
70 lines (51 loc) · 1.64 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
64
65
66
67
68
69
70
.PHONY: docker-telemetry build generate generate-llmstxt image
.PHONY: test test-docker coverage test-coverage convert-test-coverage test-coverage-show
GO_VERSION := 1.26
build:
go build -race -v -o couper main.go
.PHONY: update-modules
update-modules:
go get -u
go mod tidy
docker-telemetry:
docker compose -f telemetry/docker-compose.yaml pull
docker compose -f telemetry/docker-compose.yaml up --build
generate:
go generate main.go
generate-docs:
go run -tags exclude config/generate/docs/main.go
generate-llmstxt: generate-docs
go run -tags exclude config/generate/llmstxt/main.go
generate-vscode:
go run -tags exclude ./config/generate/vscode/... -o vscode-schema.json
.PHONY: serve-docs
serve-docs: generate-docs
cd docs/website && hugo server
image:
docker build -t coupergateway/couper:latest .
test:
@echo "Running tests..."
@for PACKAGE in $$(go list ./...); do \
echo "Testing $$PACKAGE"; \
if go test -v -timeout 90s -race -count=1 $$PACKAGE; then \
echo "\033[32m✔ $$PACKAGE PASSED\033[0m"; \
else \
echo "\033[31m✖ $$PACKAGE FAILED\033[0m"; \
exit 1; \
fi; \
done
@echo "\033[32m✔ All tests passed!\033[0m"
test-docker:
docker run --rm -v $(CURDIR):/go/app -w /go/app golang:$(GO_VERSION) sh -c "go test -short -count 1 -v -timeout 300s -race ./..."
coverage: test-coverage test-coverage-show
test-coverage:
go test -v -short -vet=off -timeout 300s -coverprofile=c.out ./...
test-coverage-show:
go tool cover -html=c.out
.PHONY: mtls-certificates
mtls-certificates:
time go run internal/tls/cli/main.go
BASE ?= main
.PHONY: changelog-deps
changelog-deps:
@scripts/changelog-deps.sh $(BASE) $(SINCE)