Add Elm petstore scripts to ensure-uptodate script (#2823)

* update elm petstore samples

* add elm to ensure uptodate script

* add elm-format

* add symlink to elm-format
This commit is contained in:
William Cheng 2019-05-06 22:19:59 +08:00 committed by GitHub
parent 909d454f9d
commit 4fa284ed5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 2 deletions

View File

@ -18,6 +18,13 @@ elif [ "$NODE_INDEX" = "2" ]; then
if [[ $project_version == *"-SNAPSHOT" ]]; then
echo "Running node $NODE_INDEX to test ensure-up-to-date"
java -version
# install elm-format for formatting elm code
npm install -g elm-format
# symlink elm-format
sudo ln -s /opt/circleci/.nvm/versions/node/v12.1.0/bin/elm-format /usr/local/bin/elm-format
./bin/utils/ensure-up-to-date
fi
#elif [ "$NODE_INDEX" = "3" ]; then

View File

@ -25,8 +25,11 @@ then
mvn -B clean package
fi
# auto format elm code using elm-format
export ELM_POST_PROCESS_FILE="/usr/local/bin/elm-format --elm-version=0.18 --yes"
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm-0.18 --additional-properties elmVersion=0.18 $@"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm-0.18 --additional-properties elmVersion=0.18 --enable-post-process-file $@"
java $JAVA_OPTS -jar $executable $ags

View File

@ -25,8 +25,11 @@ then
mvn -B clean package
fi
# auto format elm code using elm-format
export ELM_POST_PROCESS_FILE="/usr/local/bin/elm-format --elm-version=0.19 --yes"
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm $@"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/client/petstore/elm --enable-post-process-file $@"
java $JAVA_OPTS -jar $executable $ags

View File

@ -52,6 +52,7 @@ declare -a scripts=(
"./bin/elixir-petstore.sh"
"./bin/go-petstore.sh"
"./bin/go-gin-petstore-server.sh"
"./bin/elm-petstore-all.sh"
"./bin/meta-codegen.sh"
# OTHERS
"./bin/utils/export_docs_generators.sh"