forked from wundergraph/wundergraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (47 loc) · 1.47 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
all: check-setup
# Bootstrap pnpm workspace
./scripts/pnpm.sh
# prepare and install engine
make engine-dev
docs:
pnpm --filter="./docs-website" dev
build-docs:
cd docs-website && pnpm build
engine-dev: codegen
go mod tidy
go mod download
check-setup:
$(shell ./scripts/check-setup.sh)
setup-dev:
./scripts/setup-dev.sh
bootstrap-minio:
./scripts/minio-setup.sh
test-go:
go test ./...
test-ts:
pnpm test
test: test-go test-ts
golang-ci:
golangci-lint run
golang-ci-fix:
golangci-lint run --fix
install-proto:
go install google.golang.org/protobuf/cmd/[email protected]
codegen-go: install-proto
cd types && ./generate.sh
codegen: install-proto codegen-go
pnpm codegen
build: codegen
cd cmd/wunderctl && go build -o ../../wunderctl -ldflags "-X 'main.commit=$(shell git rev-parse --short HEAD)' -X 'main.builtBy=dev' -X 'main.version=dev' -X 'main.date=$(shell date)'" -trimpath
# This command builds the wunderctl binary and copies it into the nodejs wunderctl wrapper
wunderctl: build
pnpm -r run --filter="./packages/wunderctl" build
rm -f packages/wunderctl/download/wunderctl
cp -f wunderctl packages/wunderctl/download/wunderctl
rm wunderctl
run:
cd cmd/wunderctl && go run main.go
# CGO_ENABLED is set to 0 to avoid linking to libc. This is required to run the binary on alpine.
install:
cd cmd/wunderctl && CGO_ENABLED=0 go install
.PHONY: codegen build run tag install-proto format-templates dev all check-local docs wunderctl build-docs bootstrap-minio