]> git.r.bdr.sh - rbdr/lyricli/blobdiff - Scripts/install_swiftlint.sh
Adapt CI scripts to work under swift docker image
[rbdr/lyricli] / Scripts / install_swiftlint.sh
index 6a2f250f8ba5c2e2d3ed5e5ce180baed313c5732..4b8299d437cc18e8a02b56405506d3b02f48025f 100755 (executable)
@@ -1,25 +1,11 @@
 #!/bin/bash
 
-# Taken from: https://alexplescan.com/posts/2016/03/03/setting-up-swiftlint-on-travis-ci/
-
-# Installs the SwiftLint package.
-# Tries to get the precompiled .pkg file from Github, but if that
-# fails just recompiles from source.
+# Installs SwiftLint from source (Intended to be used with
+# swift docker image)
 
 set -e
 
-SWIFTLINT_PKG_PATH="/tmp/SwiftLint.pkg"
-SWIFTLINT_PKG_URL="https://github.com/realm/SwiftLint/releases/download/0.18.1/SwiftLint.pkg"
-
-wget --output-document=$SWIFTLINT_PKG_PATH $SWIFTLINT_PKG_URL
-
-if [ -f $SWIFTLINT_PKG_PATH ]; then
-  echo "SwiftLint package exists! Installing it..."
-  sudo installer -pkg $SWIFTLINT_PKG_PATH -target /
-else
-  echo "SwiftLint package doesn't exist. Compiling from source..." &&
-  git clone https://github.com/realm/SwiftLint.git /tmp/SwiftLint &&
-  cd /tmp/SwiftLint &&
-  git submodule update --init --recursive &&
-  sudo make install
-fi
+git clone https://github.com/realm/SwiftLint.git /tmp/SwiftLint &&
+cd /tmp/SwiftLint &&
+git submodule update --init --recursive &&
+make install