-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (30 loc) · 1020 Bytes
/
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
.PHONY: node-deps go-deps deps gen check-gen add-license check-license spellcheck shellcheck salus check-valid
ADDLICENSE_IGNORE=-ignore ".github/**/*"
LICENCE_SCRIPT=addlicense -c "BlockCypher" -l "apache" -v ${ADDLICENSE_IGNORE}
node-deps:
npm install -g @openapitools/openapi-generator-cli
npm install -g @apidevtools/swagger-cli
go-deps:
go install github.com/google/addlicense@latest
go install github.com/client9/misspell/cmd/misspell@latest
echo `go env GOPATH`/bin >> ${GITHUB_PATH}
deps: node-deps go-deps
gen:
openapi-generator-cli generate -i api.yaml -g go -o build
check-valid:
openapi-generator-cli validate -i api.yaml
check-gen: | gen
git diff --exit-code
add-license:
${LICENCE_SCRIPT} .
check-license:
${LICENCE_SCRIPT} -check .
spellcheck:
misspell -error .
shellcheck:
shellcheck codegen.sh
bundle:
swagger-cli bundle api.yaml -o api.json
salus:
docker run --rm -t -v ${PWD}:/home/repo coinbase/salus
release: check-valid shellcheck spellcheck check-gen check-license salus