-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (31 loc) · 852 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
.SHELLFLAGS += -x -e
PWD = $(shell pwd)
UID = $(shell id -u)
GID = $(shell id -g)
all: clean build
clean:
rm -rf src/ docs/
build:
mv schema.yml schema-old.yml
wget -O schema.yml https://raw.githubusercontent.com/goauthentik/authentik/main/schema.yml
docker run --rm \
-v "${PWD}:/local" \
--user "${UID}:${GID}" \
docker.io/openapitools/openapi-diff:2.1.0-beta.11 \
--markdown /local/diff.test \
/local/schema-old.yml /local/schema.yml || echo > diff.test
rm schema-old.yml
docker run --rm \
-v "${PWD}:/local" \
--user "${UID}:${GID}" \
docker.io/openapitools/openapi-generator-cli:v7.8.0 \
generate \
-i /local/schema.yml \
-g rust \
-o /local \
-c /local/config.yaml
rm -f .travis.yml git_push.sh
cargo fmt
mv diff.test /tmp/diff.test
echo "Update API Client\n\n" > diff.test
cat /tmp/diff.test >> diff.test