mas/script/swiftlint_runscript

26 lines
608 B
Text
Raw Normal View History

2019-01-15 18:31:51 -07:00
#!/bin/bash -e
#
# script/swiftlint_runscript
# mas-cli
#
# SwiftLint invocation from inside Xcode. Minimal output.
#
if test -n "$JENKINS_URL"
then
echo "Skipping SwiftLint run script on CI, will run in Lint stage."
2019-01-15 20:46:21 -07:00
exit
2019-01-15 18:31:51 -07:00
fi
# 😕 When run from Xcode, the command command doesn't support these options
# command --quiet --search swiftlint
# : command: --: invalid option
# : command: usage: command [-pVv] command [arg ...]
if command -v swiftlint > /dev/null; then
swiftlint lint --quiet
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi