forked from ccouzens/keycloak-openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (63 loc) · 1.64 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
73
74
specs = \
keycloak/5.0.json \
keycloak/6.0.json \
keycloak/7.0.json \
keycloak/8.0.json \
keycloak/9.0.json \
keycloak/10.0.json \
keycloak/11.0.json \
keycloak/12.0.json \
keycloak/13.0.json \
keycloak/14.0.json \
keycloak/sso-6.json \
keycloak/sso-7.3.json \
keycloak/sso-7.4.json \
yamls = \
keycloak/5.0.yml \
keycloak/6.0.yml \
keycloak/7.0.yml \
keycloak/8.0.yml \
keycloak/9.0.yml \
keycloak/10.0.yml \
keycloak/11.0.yml \
keycloak/12.0.yml \
keycloak/12.0-patched.yml \
keycloak/13.0.yml \
keycloak/13.0-patched.yml \
keycloak/14.0.yml \
keycloak/sso-6.yml \
keycloak/sso-7.3.yml \
keycloak/sso-7.4.yml \
html = \
keycloak/5.0.html \
keycloak/6.0.html \
keycloak/7.0.html \
keycloak/8.0.html \
keycloak/9.0.html \
keycloak/10.0.html \
keycloak/11.0.html \
keycloak/12.0.html \
keycloak/13.0.html \
keycloak/14.0.html \
keycloak/sso-6.html \
keycloak/sso-7.3.html \
keycloak/sso-7.4.html \
.PHONY : all
all : keycloak/LICENSE.txt $(specs) $(yamls)
.PHONY : clean
clean :
rm -f $(specs) $(html) keycloak/LICENSE.txt $(yamls)
.PHONY : cleanAll
cleanAll : clean
git clean -fXd
.SECONDARY: $(html)
keycloak/LICENSE.txt:
curl https://raw.githubusercontent.com/keycloak/keycloak/master/LICENSE.txt > $@
keycloak/sso-%.html:
curl "https://access.redhat.com/webassets/avalon/d/red-hat-single-sign-on/version-$(subst sso-,,$(basename $(notdir $@)))/restapi/" > $@
keycloak/%.html:
curl "https://www.keycloak.org/docs-api/$(basename $(notdir $@))/rest-api/index.html" > $@
keycloak/%.json: keycloak/%.html
(cd keycloak-openapi-transformer; cargo run --release) < $(addsuffix .html,$(basename $@)) > $@
keycloak/%.yml: keycloak/%.json
yq --yaml-output < $< > $@