forked from inngest/inngest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
80 lines (65 loc) · 1.63 KB
/
Makefile
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
71
72
73
74
75
76
77
78
79
80
.PHONY: dev
dev:
goreleaser build --single-target --snapshot --rm-dist
.PHONY: run
run:
CONNECT_TEST_GATEWAY_ID=dev LOG_LEVEL=debug go run ./cmd/main.go dev -v $(PARAMS)
xgo:
xgo -pkg cmd -ldflags="-s -w" -out build/inngest -targets "linux/arm64,linux/amd64,darwin/arm64,darwin/amd64" .
.PHONY: test
test:
go test $(shell go list ./... | grep -v tests) -race -count=1
golangci-lint run
.PHONY: vendor
vendor:
go install github.com/goware/modvendor@latest
go mod tidy && go mod vendor && modvendor -copy="**/*.a" -v
.PHONY: lint
lint:
golangci-lint run --verbose
.PHONY: e2e
e2e:
./tests.sh
.PHONY: gen
gen:
go generate ./...
make gql queries
.PHONY: protobuf
protobuf:
buf generate
# $GOBIN must be set and be in your path for this to work
.PHONY: queries
queries:
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
sqlc generate
.PHONY: snapshot
snapshot:
goreleaser release --snapshot --skip-publish --rm-dist
.PHONY: build-ui
build-ui:
cd ui/apps/dev-server-ui && pnpm install
cd ui/apps/dev-server-ui && pnpm build
cp -r ./ui/apps/dev-server-ui/dist/* ./pkg/devserver/static/
cp -r ./ui/apps/dev-server-ui/.next/routes-manifest.json ./pkg/devserver/static/
.PHONY: build
build:
goreleaser build
.PHONY: gql
gql:
go run github.com/99designs/gqlgen --verbose --config ./pkg/coreapi/gqlgen.yml
.PHONY: nats-js
nats-js:
nats-server -js -sd ./tmp/nats -m 8222
.PHONY: nats-stream
nats-stream:
nats stream add \
--subjects=inngest.run.spans \
--description='Trace span delivery pipeline' \
--retention=limits \
--max-msg-size=10mb \
--max-age=7d \
--storage=file \
--replicas=1 \
--discard=old \
--defaults \
trace