-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (33 loc) · 1.33 KB
/
Makefile
File metadata and controls
42 lines (33 loc) · 1.33 KB
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
format: .bin/ory node_modules # formats the source code
.bin/ory dev headers copyright --type=open-source --exclude=app.config.js
npm exec -- prettier --write .
help:
@cat Makefile | grep '^[^ ]*:' | grep -v '^\.bin/' | grep -v '.SILENT:' | grep -v '^node_modules:' | grep -v help | sed 's/:.*#/#/' | column -s "#" -t
licenses: .bin/licenses node_modules # checks open-source licenses
.bin/licenses
.bin/licenses: Makefile
curl --retry 7 --retry-connrefused https://raw.githubusercontent.com/ory/ci/master/licenses/install | sh
.bin/ory: Makefile
curl --retry 7 --retry-connrefused https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -b .bin ory v0.1.48
touch .bin/ory
node_modules: package-lock.json
npm ci
touch node_modules
.PHONY: build-sdk
build-sdk: node_modules # generates and builds the local SDK
ifdef KRATOS_DIR
(cd $(KRATOS_DIR); make sdk)
cp $(KRATOS_DIR)/spec/api.json ./contrib/sdk/api.json
endif
rm -rf ./contrib/sdk/generated
npx @openapitools/openapi-generator-cli generate -i "./contrib/sdk/api.json" \
-g typescript-fetch \
-o "./contrib/sdk/generated" \
--git-user-id ory \
--git-repo-id sdk \
--git-host github.com \
-c ./contrib/sdk/typescript-fetch.yml
(cd ./contrib/sdk/generated; npm i; npm run build)
.PHONY: sdk
sdk: build-sdk # alias for build-sdk
.DEFAULT_GOAL := help