Skip to content

Commit

Permalink
Updated scripts and quick start binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Tam authored and frantuma committed Nov 25, 2019
1 parent 3da1101 commit 350afd2
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 116 deletions.
Binary file added scripts/bin/jetty-runner.jar
Binary file not shown.
Binary file modified scripts/bin/swagger-editor.war
Binary file not shown.
3 changes: 2 additions & 1 deletion scripts/editor.sh
@@ -1 +1,2 @@
mvn -f editor/editor.xml jetty:run-war
#!/usr/bin/env bash
java -Dconfig=editor/inflector.yaml -jar editor/jetty-runner.jar --port 8000 editor/swagger-editor.war
56 changes: 0 additions & 56 deletions scripts/editor.xml

This file was deleted.

47 changes: 0 additions & 47 deletions scripts/openapi.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/pom.xml
Expand Up @@ -24,9 +24,9 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId>
<artifactId>SAMPLE_PROJECT</artifactId>
<packaging>jar</packaging>
<packaging>war</packaging>
<name>SAMPLE_PROJECT</name>
<version>1.0.1</version>
<version>1.0.0</version>
<prerequisites>
<maven>2.2.0</maven>
</prerequisites>
Expand Down
20 changes: 10 additions & 10 deletions setup.sh
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
PROJECT=$project
FORK=${FORK:-"swagger-api/swagger-inflector/raw/master"}

if [ "$PROJECT" == "" ]
then
Expand All @@ -10,33 +12,31 @@ then
exit
fi

echo "fetching setup files from $FORK"

# setup dirs
mkdir -p editor
mkdir -p src/main/swagger
mkdir -p src/main/webapp/WEB-INF

if [ ! -f editor/swagger-editor.war ]; then
echo "...fetching editor webapp"
wget --quiet --no-check-certificate "https://github.com/swagger-api/swagger-inflector/raw/master/scripts/bin/swagger-editor.war" -O editor/swagger-editor.war
curl -sL "https://raw.githubusercontent.com/$FORK/scripts/bin/swagger-editor.war" -o editor/swagger-editor.war
curl -sL "https://raw.githubusercontent.com/$FORK/scripts/bin/jetty-runner.jar" -o editor/jetty-runner.jar
fi

echo "...fetching editor scripts"
wget --quiet --no-check-certificate "https://github.com/swagger-api/swagger-inflector/raw/master/scripts/editor.xml" -O editor/editor.xml
wget --quiet --no-check-certificate "https://github.com/swagger-api/swagger-inflector/raw/master/scripts/editor.sh" -O ./editor.sh

echo "...fetching sample swagger description"

wget --quiet --no-check-certificate "https://raw.githubusercontent.com/swagger-api/swagger-inflector/master/scripts/openapi.yaml" -O src/main/swagger/openapi.yaml
curl -sL "https://raw.githubusercontent.com/$FORK/scripts/editor.sh" -o ./editor.sh


echo "...fetching inflector configuration"
wget --quiet --no-check-certificate "https://raw.githubusercontent.com/swagger-api/swagger-inflector/master/scripts/inflector.yaml" -O ./inflector.yaml
curl -sL "https://raw.githubusercontent.com/$FORK/scripts/inflector.yaml" -o ./inflector.yaml

echo "...fetching project pom"
wget --quiet --no-check-certificate "https://raw.githubusercontent.com/swagger-api/swagger-inflector/master/scripts/pom.xml" -O ./pom.xml
curl -sL "https://raw.githubusercontent.com/$FORK/scripts/pom.xml" -o ./pom.xml

echo "...fetching web.xml"
wget --quiet --no-check-certificate "https://raw.githubusercontent.com/swagger-api/swagger-inflector/master/scripts/web.xml" -O src/main/webapp/WEB-INF/web.xml
curl -sL "https://raw.githubusercontent.com/$FORK/scripts/web.xml" -o src/main/webapp/WEB-INF/web.xml
chmod a+x ./editor.sh

rp="s/SAMPLE_PROJECT/$PROJECT/g"
Expand Down

0 comments on commit 350afd2

Please sign in to comment.