forked from open-feature/flagd-schemas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (33 loc) · 1.57 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
BUF_VERSION=v1.6.0
guard-%:
@ if [ "${${*}}" = "" ]; then \
echo "Environment variable $* not set"; \
exit 1; \
fi
install-buf:
go install github.com/bufbuild/buf/cmd/buf@${BUF_VERSION}
install-yq:
go install github.com/mikefarah/yq/v4@latest
lint: guard-GOPATH
cd protobuf && ${GOPATH}/bin/buf lint
gen-go: install-buf guard-GOPATH
${GOPATH}/bin/buf generate buf.build/open-feature/flagd --template protobuf/buf.gen.go.yaml
gen-go-server: install-buf guard-GOPATH
${GOPATH}/bin/buf generate buf.build/open-feature/flagd --template protobuf/buf.gen.go-server.yaml
gen-ts: install-buf guard-GOPATH
${GOPATH}/bin/buf generate buf.build/open-feature/flagd --template protobuf/buf.gen.ts.yaml
gen-java: install-buf guard-GOPATH
${GOPATH}/bin/buf generate buf.build/open-feature/flagd --template protobuf/buf.gen.java.yaml
gen-python: install-buf guard-GOPATH
${GOPATH}/bin/buf generate buf.build/open-feature/flagd --template protobuf/buf.gen.python.yaml
gen-csharp: install-buf guard-GOPATH
${GOPATH}/bin/buf generate buf.build/open-feature/flagd --template protobuf/buf.gen.csharp.yaml
gen-php: install-buf guard-GOPATH
${GOPATH}/bin/buf generate buf.build/open-feature/flagd --template protobuf/buf.gen.php.yaml
gen-ruby: install-buf guard-GOPATH
${GOPATH}/bin/buf generate buf.build/open-feature/flagd --template protobuf/buf.gen.ruby.yaml
gen-schema-json: install-yq
yq eval -o=json json/flagd-definitions.yaml > json/flagd-definitions.json
ajv-validate-flagd-schema:
@if ! npm ls ajv-cli; then npm ci; fi
npx ajv compile -s json/flagd-definitions.json