Converted iOS test app to Swift

This commit is contained in:
Pierre-Olivier Latour
2019-01-06 10:32:02 -08:00
parent 5eb5e14b70
commit edd1f2850b
11 changed files with 150 additions and 200 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh -ex
#!/bin/sh -exuo pipefail
# brew install clang-format
@ -8,6 +8,15 @@ if [[ "$CLANG_FORMAT_VERSION" != "7.0.0" ]]; then
exit 1
fi
if [[ ! -f "build/swiftformat" ]]; then
mkdir -p "build"
curl -sfL -o "build/SwiftFormat.zip" "https://github.com/nicklockwood/SwiftFormat/archive/0.37.2.zip"
unzip "build/SwiftFormat.zip" "SwiftFormat-0.37.2/CommandLineTool/swiftformat" -d "build"
mv "build/SwiftFormat-0.37.2/CommandLineTool/swiftformat" "build/swiftformat"
fi
clang-format -style=file -i *.h
pushd "GCDWebServer/Core"
clang-format -style=file -i *.h *.m
popd
@ -30,11 +39,10 @@ popd
pushd "Mac"
clang-format -style=file -i *.m
popd
pushd "iOS"
clang-format -style=file -i *.h *.m
popd
pushd "tvOS"
clang-format -style=file -i *.h *.m
popd
build/swiftformat --indent 2 "iOS"
echo "OK"