Converted iOS test app to Swift
This commit is contained in:
@ -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"
|
||||
|
||||
Reference in New Issue
Block a user