15 lines
347 B
Bash
15 lines
347 B
Bash
|
#!/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 /local/swagger/swagger.json -l go -o /local/selfapi_bak
|
||
|
|
||
|
if [ -d selfapi_bak ]; then
|
||
|
rm -fr selfapi
|
||
|
mv selfapi_bak selfapi
|
||
|
fi
|