♻️ :: Replace shell scripts with fastlane

This commit is contained in:
Felix Mau
2020-02-07 18:16:59 +01:00
parent fac3a404ce
commit aff7c3e266
5 changed files with 8 additions and 70 deletions
+8 -5
View File
@@ -8,10 +8,13 @@
osx_image: xcode11
language: swift
before_script:
- cd Example/
- bundle install
script:
- ./Scripts/swift-format.sh
- ./Scripts/swift-lint.sh
- ./Scripts/pod-lint.sh
- ./Scripts/test.sh
- bundle exec fastlane format
- bundle exec fastlane lint
- bundle exec fastlane tests
- bundle exec fastlane pod_lint
after_success:
- bash <(curl -s https://codecov.io/bash)
- bash <(curl -s https://codecov.io/bash)
-7
View File
@@ -1,7 +0,0 @@
#
# pod-lint.sh
# Created by Felix Mau (https://felix.hamburg)
#
#!/bin/bash
pod lib lint
-19
View File
@@ -1,19 +0,0 @@
#
# swift-format.sh
# Created by Felix Mau (https://felix.hamburg)
#
#!/bin/bash
cd Example/
# Path config
PODS_ROOT="Pods"
SWIFTFORMAT="${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat"
if [ ! -f "$SWIFTFORMAT" ]; then
echo "warning: SwiftFormat not installed!"
exit 1
fi
# Run "swiftformat" and break build on any warnings.
$SWIFTFORMAT ../ --lint
-19
View File
@@ -1,19 +0,0 @@
#
# swift-lint.sh
# Created by Felix Mau (https://felix.hamburg)
#
#!/bin/bash
cd Example/
# Path config
PODS_ROOT="Pods"
SWIFTLINT="${PODS_ROOT}/SwiftLint/swiftlint"
if [ ! -f "$SWIFTLINT" ]; then
echo "warning: SwiftLint not installed!"
exit 1
fi
# Run "swiftlint" and break build on any warnings.
$SWIFTLINT --strict
-20
View File
@@ -1,20 +0,0 @@
#
# test.sh
# Created by Felix Mau (https://felix.hamburg)
#
# Based on:
# - http://www.mokacoding.com/blog/running-tests-from-the-terminal/
# - https://github.com/supermarin/xcpretty#usage
# - https://www.objc.io/issues/6-build-tools/travis-ci/
# - https://github.com/codecov/example-swift
#
#!/bin/bash
cd Example/
xcodebuild \
-workspace GradientLoadingBar.xcworkspace \
-scheme GradientLoadingBar-Example \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 11 Pro,OS=13.0' \
build test | xcpretty && exit ${PIPESTATUS[0]}