forked from ory/kratos-selfservice-ui-node
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
38 lines (33 loc) · 1.09 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
rand := $(shell openssl rand -hex 6)
.PHONY: docker
docker:
docker build -t oryd/kratos-selfservice-ui-node:latest .
.PHONY: build-sdk
build-sdk:
(cd $$KRATOS_DIR; make sdk)
cp $$KRATOS_DIR/spec/api.json ./contrib/sdk/api.json
npx @openapitools/openapi-generator-cli generate -i "./contrib/sdk/api.json" \
-g typescript-axios \
-o "./contrib/sdk/generated" \
--git-user-id ory \
--git-repo-id sdk \
--git-host github.com \
-c ./contrib/sdk/typescript.yml
(cd ./contrib/sdk/generated; npm i; npm run build)
rm -rf node_modules/@ory/kratos-client/*
cp -r ./contrib/sdk/generated/* node_modules/@ory/kratos-client
.PHONY: publish-sdk
publish-sdk: build-sdk
(cd ./contrib/sdk/generated/; \
npm --no-git-tag-version version v0.0.0-next.$(rand) && \
npm publish)
rm -rf node_modules/@ory/kratos-client/*
sleep 30
npm i @ory/[email protected].$(rand)
.PHONY: build-sdk-docker
build-sdk-docker: build-sdk
docker build -t oryd/kratos-selfservice-ui-node:latest . --build-arg LINK=true
.PHONY: clean-sdk
clean-sdk:
rm -rf node_modules/@ory/kratos-client/
npm i