Skip to content

Commit 0c3fc84

Browse files
committed
minor enhancemnt to swift3 bin scripts
1 parent 62b93fc commit 0c3fc84

File tree

2 files changed

+6
-38
lines changed

2 files changed

+6
-38
lines changed

bin/swift3-petstore-all.sh

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,16 @@
11
#!/bin/sh
22

3-
SCRIPT="$0"
4-
5-
while [ -h "$SCRIPT" ] ; do
6-
ls=`ls -ld "$SCRIPT"`
7-
link=`expr "$ls" : '.*-> \(.*\)$'`
8-
if expr "$link" : '/.*' > /dev/null; then
9-
SCRIPT="$link"
10-
else
11-
SCRIPT=`dirname "$SCRIPT"`/"$link"
12-
fi
13-
done
14-
15-
if [ ! -d "${APP_DIR}" ]; then
16-
APP_DIR=`dirname "$SCRIPT"`/..
17-
APP_DIR=`cd "${APP_DIR}"; pwd`
18-
fi
19-
20-
executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
21-
22-
if [ ! -f "$executable" ]
23-
then
24-
mvn clean package
25-
fi
26-
27-
# if you've executed sbt assembly previously it will use that instead.
28-
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore.json -o samples/client/petstore/swift3/default"
30-
313
echo "#### Petstore Swift API client (default) ####"
32-
java $JAVA_OPTS -jar $executable $ags
4+
./bin/swift3-petstore.sh
335

34-
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-promisekit.json -o samples/client/petstore/swift3/promisekit"
356
echo "#### Petstore Swift API client (promisekit) ####"
36-
java $JAVA_OPTS -jar $executable $ags
7+
./bin/swift3-petstore-promisekit.sh
378

38-
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-rxswift.json -o samples/client/petstore/swift3/rxswift"
399
echo "#### Petstore Swift API client (rxswift) ####"
40-
java $JAVA_OPTS -jar $executable $ags
10+
./bin/swift3-petstore-rxswift.sh
4111

42-
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-unwraprequired.json -o samples/client/petstore/swift3/unwraprequired"
4312
echo "#### Petstore Swift API client (unwraprequired) ####"
44-
java $JAVA_OPTS -jar $executable $ags
13+
./bin/swift3-petstore-unwraprequired.sh
4514

46-
ags="$@ generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-objcCompatible.json -o samples/client/petstore/swift3/objcCompatible"
4715
echo "#### Petstore Swift API client (objcCompatible) ####"
48-
java $JAVA_OPTS -jar $executable $ags
16+
./bin/swift3-petstore-objcCompatible.sh

bin/swift3-petstore-objcCompatible.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="generate -v -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-objcCompatible.json -o samples/client/petstore/swift3/objcCompatible $@"
29+
ags="generate -t modules/swagger-codegen/src/main/resources/swift3 -i modules/swagger-codegen/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -l swift3 -c ./bin/swift3-petstore-objcCompatible.json -o samples/client/petstore/swift3/objcCompatible $@"
3030

3131
java $JAVA_OPTS -jar $executable $ags

0 commit comments

Comments
 (0)