-
Notifications
You must be signed in to change notification settings - Fork 152
/
Makefile
72 lines (50 loc) · 1.55 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
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
format-templates:
pnpx prettier --write pkg/templates/assets/templates --ignore-unknown
golang-ci:
golangci-lint run
golang-ci-fix:
golangci-lint run --fix
install-proto:
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1
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
install:
cd cmd/wunderctl && go install
update-examples:
cd examples && rm -rf simple && mkdir simple && cd simple && wunderctl init
.PHONY: codegen build run tag install-proto format-templates dev all check-local docs wunderctl build-docs bootstrap-minio