[macOS] install swiftlint from pkg (#2296)

* install swiftling from pkg for Mojave

* Install swiftlint from package for all OS except HS, return xcode-clt installation

* add utils.sh
This commit is contained in:
Mikhail Timofeev
2020-12-18 20:41:31 +03:00
committed by GitHub
parent 73094f3bea
commit c160ddf991
6 changed files with 16 additions and 8 deletions

View File

@@ -0,0 +1,9 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
echo "Install SwiftLint"
swiftlintUrl=$(curl -s "https://api.github.com/repos/realm/SwiftLint/releases/latest" | jq -r '.assets[].browser_download_url | select(contains("SwiftLint.pkg"))')
download_with_retries $swiftlintUrl "/tmp" "SwiftLint.pkg"
sudo installer -pkg /tmp/SwiftLint.pkg -target /
rm -rf /tmp/SwiftLint.pkg