This is an automated email from the ASF dual-hosted git repository.

sgoeschl pushed a commit to branch FREEMARKER-151
in repository https://gitbox.apache.org/repos/asf/freemarker-generator.git


The following commit(s) were added to refs/heads/FREEMARKER-151 by this push:
     new 383a3c8  FREEMARKER-151 [freemarker-cli] Ensure that build and and 
examples are running on Windows
383a3c8 is described below

commit 383a3c8072e7bed77257cf97e6081bcea1216365
Author: Siegfried Goeschl <[email protected]>
AuthorDate: Tue Jul 7 12:41:04 2020 +0200

    FREEMARKER-151 [freemarker-cli] Ensure that build and and examples are 
running on Windows
---
 freemarker-generator-cli/src/main/scripts/run-examples.bat | 10 ++++------
 freemarker-generator-cli/src/main/scripts/run-examples.sh  |  4 +---
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/freemarker-generator-cli/src/main/scripts/run-examples.bat 
b/freemarker-generator-cli/src/main/scripts/run-examples.bat
index ce35e5a..4248866 100644
--- a/freemarker-generator-cli/src/main/scripts/run-examples.bat
+++ b/freemarker-generator-cli/src/main/scripts/run-examples.bat
@@ -41,9 +41,9 @@ REM 
=========================================================================
 REM Interactive Mode
 REM =========================================================================
 
-%FREEMARKER_CMD% -i 
'${JsonPathTool.parse(DataSources.first).read("$.info.title")}' 
examples\data\json\swagger-spec.json > target\out\interactive-json.txt
-%FREEMARKER_CMD% -i 
'${XmlTool.parse(DataSources.first)["recipients\person[1]\name"]}' 
examples\data\xml\recipients.xml > target\out\interactive-xml.txt
-%FREEMARKER_CMD% -i '${JsoupTool.parse(DataSources.first).select("a")[0]}' 
examples\data\html\dependencies.html > target\out\interactive-html.txt
+%FREEMARKER_CMD% -i 
'${JsonPathTool.parse(DataSources.first).read("""$.info.title""")}' 
examples\data\json\swagger-spec.json > target\out\interactive-json.txt
+%FREEMARKER_CMD% -i 
'${XmlTool.parse(DataSources.first)["""recipients/person[1]/name"""]}' 
examples\data\xml\recipients.xml > target\out\interactive-xml.txt
+%FREEMARKER_CMD% -i '${JsoupTool.parse(DataSources.first).select("""a""")[0]}' 
examples\data\html\dependencies.html > target\out\interactive-html.txt
 %FREEMARKER_CMD% -i '${GsonTool.toJson(YamlTool.parse(DataSources.get(0)))}' 
examples\data\yaml\swagger-spec.yaml > target\out\interactive-swagger.json
 %FREEMARKER_CMD% -i '${YamlTool.toYaml(GsonTool.parse(DataSources.get(0)))}' 
examples\data\json\swagger-spec.json > target\out\interactive-swagger.yaml
 %FREEMARKER_CMD% -i 
'${DataFrameTool.print(DataFrameTool.fromMaps(GsonTool.parse(DataSources.get(0))))}'
 examples\data\json\github-users.json > target\out\interactive-dataframe.txt
@@ -133,10 +133,8 @@ echo "examples\templates\json\csv\swagger-endpoints.ftl"
 echo "templates\json\yaml\transform.ftl"
 %FREEMARKER_CMD% -t templates\json\yaml\transform.ftl 
examples\data\json\swagger-spec.json > target\out\swagger-spec.yaml
 
-if hash curl 2>\dev\null; then
 echo "examples\templates\json\md\github-users.ftl"
-%FREEMARKER_CMD% -t examples\templates\json\md\github-users.ftl 
examples\data\json\github-users.json > target\out\github-users-curl.md
-fi
+%FREEMARKER_CMD% -t examples\templates\json\md\github-users.ftl 
examples\data\json\github-users.json > target\out\github-users.md
 
 REM =========================================================================
 REM Properties
diff --git a/freemarker-generator-cli/src/main/scripts/run-examples.sh 
b/freemarker-generator-cli/src/main/scripts/run-examples.sh
index 53f4dcd..4bca33a 100755
--- a/freemarker-generator-cli/src/main/scripts/run-examples.sh
+++ b/freemarker-generator-cli/src/main/scripts/run-examples.sh
@@ -153,10 +153,8 @@ $FREEMARKER_CMD -t 
examples/templates/json/csv/swagger-endpoints.ftl examples/da
 echo "templates/json/yaml/transform.ftl"
 $FREEMARKER_CMD -t templates/json/yaml/transform.ftl 
examples/data/json/swagger-spec.json > target/out/swagger-spec.yaml || { echo 
>&2 "Test failed.  Aborting."; exit 1; }
 
-if hash curl 2>/dev/null; then
 echo "examples/templates/json/md/github-users.ftl"
-$FREEMARKER_CMD -t examples/templates/json/md/github-users.ftl 
examples/data/json/github-users.json > target/out/github-users-curl.md || { 
echo >&2 "Test failed.  Aborting."; exit 1; }
-fi
+$FREEMARKER_CMD -t examples/templates/json/md/github-users.ftl 
examples/data/json/github-users.json > target/out/github-users.md || { echo >&2 
"Test failed.  Aborting."; exit 1; }
 
 #############################################################################
 # Properties

Reply via email to