lib/Makefile

179 lines
6.1 KiB
Makefile
Raw Normal View History

2021-07-31 03:05:02 +00:00
2022-09-07 00:16:25 +00:00
.PHONY: swagger
2021-07-31 03:05:02 +00:00
swagger:
2022-05-28 19:45:41 +00:00
cp ../auth/swagger/auth-vernonkeenan.yaml ./swagger
2022-09-07 00:16:25 +00:00
cp ../auth/swagger/auth-vernonkeenan.yaml ./swagger/external
2022-05-28 19:45:41 +00:00
cp ../crm/swagger/crm-vernonkeenan.yaml ./swagger
2022-09-07 00:16:25 +00:00
cp ../crm/swagger/crm-vernonkeenan.yaml ./swagger/external
2022-05-28 19:45:41 +00:00
cp ../devops/swagger/devops-vernonkeenan.yaml ./swagger
2022-09-07 00:16:25 +00:00
cp ../devops/swagger/devops-vernonkeenan.yaml ./swagger/external
2022-05-28 19:45:41 +00:00
cp ../stash/swagger/stash-vernonkeenan.yaml ./swagger
2022-09-07 00:16:25 +00:00
cp ../stash/swagger/stash-vernonkeenan.yaml ./swagger/external
2022-05-28 19:45:41 +00:00
cp ../sf-gate/swagger/sf-gate-vernonkeenan.yaml ./swagger
2022-09-07 00:16:25 +00:00
cp ../sf-gate/swagger/sf-gate-vernonkeenan.yaml ./swagger/external
2022-05-28 19:45:41 +00:00
cp ../research/swagger/research-vernonkeenan.yaml ./swagger
2022-09-07 00:16:25 +00:00
cp ../research/swagger/research-vernonkeenan.yaml ./swagger/external
2023-03-28 17:47:34 +00:00
cp ../members/swagger/members-vernonkeenan.yaml ./swagger
cp ../members/swagger/members-vernonkeenan.yaml ./swagger/external
2023-04-06 01:28:58 +00:00
cp ../plex/swagger/plex-vernonkeenan.yaml ./swagger
cp ../plex/swagger/plex-vernonkeenan.yaml ./swagger/external
2021-08-14 22:34:08 +00:00
#
2021-07-31 03:05:02 +00:00
rm -rf api
#
# generate auth client
#
2023-03-28 17:47:34 +00:00
mkdir -p api/auth
2023-03-22 20:49:01 +00:00
swagger generate client \
2021-07-31 03:05:02 +00:00
--log-output=./swagger/logs/generate-auth-client.log \
--copyright-file=./build/COPYRIGHT \
--name=auth \
2022-05-28 19:45:41 +00:00
--spec=./swagger/auth-vernonkeenan.yaml \
2021-07-31 03:05:02 +00:00
--target=./api/auth \
--client-package=auth-client \
--model-package=auth-models \
--principal=app.User
#
2022-09-07 00:16:25 +00:00
# update external auth client
#
sed -i 's|"http"|"https"|g' ./swagger/external/auth-vernonkeenan.yaml
sed -i 's|auth.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/auth-vernonkeenan.yaml
sed -i 's|"/v1"|"/vk/auth/v1"|g' ./swagger/external/auth-vernonkeenan.yaml
#
2021-07-31 03:05:02 +00:00
# generate crm client
#
mkdir api/crm
2023-03-22 20:49:01 +00:00
swagger generate client \
2021-07-31 03:05:02 +00:00
--log-output=./swagger/logs/generate-crm-client.log \
--copyright-file=./build/COPYRIGHT \
--name=crm \
2022-05-28 19:45:41 +00:00
--spec=./swagger/crm-vernonkeenan.yaml \
2021-07-31 03:05:02 +00:00
--target=./api/crm \
--client-package=crm-client \
--model-package=crm-models \
--principal=app.User
#
2022-09-07 00:16:25 +00:00
# update external crm client
#
sed -i 's|"http"|"https"|g' ./swagger/external/crm-vernonkeenan.yaml
sed -i 's|crm.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/crm-vernonkeenan.yaml
sed -i 's|"/v1"|"/vk/crm/v1"|g' ./swagger/external/crm-vernonkeenan.yaml
#
2021-07-31 03:05:02 +00:00
# generate devops client
#
mkdir api/devops
2023-03-22 20:49:01 +00:00
swagger generate client \
2021-07-31 03:05:02 +00:00
--log-output=./swagger/logs/generate-devops-client.log \
--copyright-file=./build/COPYRIGHT \
--name=devops \
2022-05-28 19:45:41 +00:00
--spec=./swagger/devops-vernonkeenan.yaml \
2021-07-31 03:05:02 +00:00
--target=./api/devops \
--client-package=devops-client \
--model-package=devops-models \
--principal=app.User
#
2022-09-07 00:16:25 +00:00
# update external devops client
#
sed -i 's|"http"|"https"|g' ./swagger/external/devops-vernonkeenan.yaml
sed -i 's|devops.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/devops-vernonkeenan.yaml
sed -i 's|"/v1"|"/vk/devops/v1"|g' ./swagger/external/devops-vernonkeenan.yaml
#
2021-07-31 03:05:02 +00:00
# generate stash client
#
mkdir api/stash
2023-03-22 20:49:01 +00:00
swagger generate client \
2021-07-31 03:05:02 +00:00
--log-output=./swagger/logs/generate-stash-client.log \
--copyright-file=./build/COPYRIGHT \
--name=stash \
2022-05-28 19:45:41 +00:00
--spec=./swagger/stash-vernonkeenan.yaml \
2021-07-31 03:05:02 +00:00
--target=./api/stash \
--client-package=stash-client \
--model-package=stash-models \
--principal=app.User
#
2022-09-07 00:16:25 +00:00
# update external stash client
#
sed -i 's|"http"|"https"|g' ./swagger/external/stash-vernonkeenan.yaml
sed -i 's|stash.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/stash-vernonkeenan.yaml
sed -i 's|"/v1"|"/vk/stash/v1"|g' ./swagger/external/stash-vernonkeenan.yaml
#
2021-08-05 19:37:53 +00:00
# generate sfgate client
2021-07-31 03:05:02 +00:00
#
2021-08-05 19:37:53 +00:00
mkdir api/sfgate
2023-03-22 20:49:01 +00:00
swagger generate client \
2021-08-05 19:37:53 +00:00
--log-output=./swagger/logs/generate-sfgate-client.log \
2021-07-31 03:05:02 +00:00
--copyright-file=./build/COPYRIGHT \
2021-08-05 19:37:53 +00:00
--name=sfgate \
2022-05-28 19:45:41 +00:00
--spec=./swagger/sf-gate-vernonkeenan.yaml \
2021-08-05 19:37:53 +00:00
--target=./api/sfgate \
--client-package=sfgate-client \
--model-package=sfgate-models \
2021-07-31 03:05:02 +00:00
--principal=app.User
#
2022-09-07 00:16:25 +00:00
# update external crm client
#
sed -i 's|"http"|"https"|g' ./swagger/external/sf-gate-vernonkeenan.yaml
sed -i 's|sf-gate.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/sf-gate-vernonkeenan.yaml
sed -i 's|"/v1"|"/vk/sf-gate/v1"|g' ./swagger/external/sf-gate-vernonkeenan.yaml
#
2021-08-14 22:34:08 +00:00
# generate research client
#
mkdir api/research
2023-03-22 20:49:01 +00:00
swagger generate client \
2021-08-14 22:34:08 +00:00
--log-output=./swagger/logs/generate-research-client.log \
--copyright-file=./build/COPYRIGHT \
--name=research \
2022-09-07 00:16:25 +00:00
--spec=./swagger/research-vernonkeenan.yaml \
2021-08-14 22:34:08 +00:00
--target=./api/research \
--client-package=research-client \
--model-package=research-models \
--principal=app.User
2022-09-07 00:16:25 +00:00
#
# update external research client
#
sed -i 's|"http"|"https"|g' ./swagger/external/research-vernonkeenan.yaml
sed -i 's|research.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/research-vernonkeenan.yaml
sed -i 's|"/v1"|"/vk/research/v1"|g' ./swagger/external/research-vernonkeenan.yaml
#
2023-03-28 17:47:34 +00:00
# generate members client
#
mkdir api/members
swagger generate client \
--log-output=./swagger/logs/generate-members-client.log \
--copyright-file=./build/COPYRIGHT \
--name=members \
--spec=./swagger/members-vernonkeenan.yaml \
--target=./api/members \
--client-package=members-client \
--model-package=members-models \
--principal=app.User
#
# update external members client
#
sed -i 's|"http"|"https"|g' ./swagger/external/members-vernonkeenan.yaml
sed -i 's|members.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/members-vernonkeenan.yaml
sed -i 's|"/v1"|"/vk/members/v1"|g' ./swagger/external/members-vernonkeenan.yaml
#
2023-04-06 01:28:58 +00:00
# generate plex client
#
mkdir api/plex
swagger generate client \
--log-output=./swagger/logs/generate-plex-client.log \
--copyright-file=./build/COPYRIGHT \
--name=plex \
--spec=./swagger/plex-vernonkeenan.yaml \
--target=./api/plex \
--client-package=plex-client \
--model-package=plex-models \
--principal=app.User
#
# update external plex client
#
sed -i 's|"http"|"https"|g' ./swagger/external/plex-vernonkeenan.yaml
sed -i 's|plex.vernonkeenan.com:8080|gw.tnxs.net|g' ./swagger/external/plex-vernonkeenan.yaml
sed -i 's|"/v1"|"/vk/plex/v1"|g' ./swagger/external/plex-vernonkeenan.yaml
#
2022-09-07 00:16:25 +00:00
# copy external swagger files
#
2023-03-28 17:47:34 +00:00
scp ./swagger/external/*.yaml root@whm.noc.tnxs.net:/home/taxnexus/www/assets/swagger/