deprecated-oc-search/scripts/generate_client.sh
2023-08-26 22:04:56 +02:00

16 lines
433 B
Bash
Executable File

#!/bin/env bash
set -xe # Don't continue if first command fail
docker run \
--rm \
--user=$UID \
--network=host \
-v ${PWD}:/local \
swaggerapi/swagger-codegen-cli:2.4.18 \
generate -i http://localhost:49618/swagger/swagger.json -l go -o /local/api-client/oc-catalog.bak
if [ -d api-client/oc-catalog.bak ]; then
rm -r api-client/oc-catalog
mv api-client/oc-catalog.bak api-client/oc-catalog
fi