Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #346 - Updated scripts and quick start binary #353

Merged
merged 2 commits into from
Nov 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
PROJECT=$project
FORK=${FORK:-"swagger-api/swagger-inflector/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