-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (35 loc) · 1.04 KB
/
Makefile
File metadata and controls
50 lines (35 loc) · 1.04 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
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 lint clean dashboard release docker
build:
CGO_ENABLED=0 go build $(LDFLAGS) -o bin/$(BINARY) ./cmd/den
test:
go test ./internal/... -short -v
test-integration:
go test ./internal/... -v -run Integration
test-sdk:
cd sdk/typescript && bun test
cd sdk/python && uv run python -m pytest
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