Skip to content
Permalink
Browse files

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
  • Loading branch information...
wing328 committed May 6, 2019
1 parent 909d454 commit 4fa284ed5d91126d86b7fb496c4428c684f30bef
Showing with 16 additions and 2 deletions.
  1. +7 −0 CI/circle_parallel.sh
  2. +4 −1 bin/elm-0.18-petstore.sh
  3. +4 −1 bin/elm-petstore.sh
  4. +1 −0 bin/utils/ensure-up-to-date
@@ -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
@@ -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
@@ -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
@@ -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"

0 comments on commit 4fa284e

Please sign in to comment.
You can’t perform that action at this time.