-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (43 loc) · 1.57 KB
/
Copy pathMakefile
File metadata and controls
59 lines (43 loc) · 1.57 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
BINARY := den
VERSION ?= dev
COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo "none")
BUILD_DATE := $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
LDFLAGS := -ldflags "-s -w -X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.buildDate=$(BUILD_DATE)"
.PHONY: build test test-integration test-sdk e2e-network lint clean dashboard release docker
build:
CGO_ENABLED=0 go build $(LDFLAGS) -o bin/$(BINARY) ./cmd/den
test:
go test ./cmd/den/... ./internal/... -short -v
test-integration:
go test -tags integration ./internal/... ./tests/... -run TestIntegration -v
test-sdk:
cd sdk/typescript && bun test
cd sdk/python && uv run python -m pytest
# Machine-checkable end-to-end network proof (real den binary + real Docker).
# Set DEN_E2E_LOCAL_NATIVE=1 ONLY on native co-resident Linux for leg D.
e2e-network:
./scripts/e2e-network.sh
# Pinned to golangci-lint v2.12.2 (matches .github/workflows/ci.yml). Install
# locally with the exact pin so local results match CI:
# curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v2.12.2/install.sh \
# | sh -s -- -b $(shell go env GOPATH)/bin v2.12.2
lint:
golangci-lint run ./...
fmt:
gofmt -s -w .
vet:
go vet ./...
dashboard:
cd dashboard-ui && bun install && bun run build
cp -r dashboard-ui/dist/* internal/dashboard/dist/
clean:
rm -rf bin/ internal/dashboard/dist/*.js internal/dashboard/dist/*.css
release:
goreleaser release --clean
docker:
docker build -t den/den:latest .
docker-image:
docker build -t den/default:latest images/default/
run: build
./bin/$(BINARY) serve
all: lint test build