1 Star 0 Fork 0

billsegates / swagger-codegen

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
docker-entrypoint.sh 934 Bytes
一键复制 编辑 原始数据 按行查看 历史
Jan Prieser 提交于 2018-05-31 10:29 . Docker: use correct MAVEN_CONFIG
#!/usr/bin/env bash
set -euo pipefail
# GEN_DIR allows to share the entrypoint between Dockerfile and run-in-docker.sh (backward compatible)
GEN_DIR=${GEN_DIR:-/opt/swagger-codegen}
JAVA_OPTS=${JAVA_OPTS:-"-Xmx1024M -DloggerPath=conf/log4j.properties"}
cli="${GEN_DIR}/modules/swagger-codegen-cli"
codegen="${cli}/target/swagger-codegen-cli.jar"
cmdsrc="${cli}/src/main/java/io/swagger/codegen/cmd"
pattern="@Command(name = \"$1\""
if expr "x$1" : 'x[a-z][a-z-]*$' > /dev/null && fgrep -qe "$pattern" "$cmdsrc"/*.java || expr "$1" = 'help' > /dev/null; then
# If ${GEN_DIR} has been mapped elsewhere from default, and that location has not been built
if [[ ! -f "${codegen}" ]]; then
(cd "${GEN_DIR}" && exec mvn -am -pl "modules/swagger-codegen-cli" -Duser.home=$(dirname $MAVEN_CONFIG) package)
fi
command=$1
shift
exec java ${JAVA_OPTS} -jar "${codegen}" "${command}" "$@"
else
exec "$@"
fi
1
https://gitee.com/billhuhongbin/swagger-codegen.git
git@gitee.com:billhuhongbin/swagger-codegen.git
billhuhongbin
swagger-codegen
swagger-codegen
master

搜索帮助