diff options
| author | Ben Beltran <ben@nsovocal.com> | 2019-05-13 22:31:50 +0200 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2019-05-13 22:31:50 +0200 |
| commit | 2cbb0a97eeb4eea8ef18d59346759b20cc8fa180 (patch) | |
| tree | c99ad0e5e431885ed37389768c3a523d3814eb4c /Scripts | |
| parent | 19e7bffcd3401026517e1f02d55f6050d3baf80d (diff) | |
Adapt CI scripts to work under swift docker image
Diffstat (limited to 'Scripts')
| -rwxr-xr-x | Scripts/install_sourcekitten.sh | 25 | ||||
| -rwxr-xr-x | Scripts/install_swiftlint.sh | 26 |
2 files changed, 11 insertions, 40 deletions
diff --git a/Scripts/install_sourcekitten.sh b/Scripts/install_sourcekitten.sh index 9420a26..f94fb53 100755 --- a/Scripts/install_sourcekitten.sh +++ b/Scripts/install_sourcekitten.sh @@ -1,25 +1,10 @@ #!/bin/bash -# Taken from: https://alexplescan.com/posts/2016/03/03/setting-up-swiftlint-on-travis-ci/ -# And adapted for sourcekitten - -# Installs the SourceKitten package. -# Tries to get the precompiled .pkg file from Github, but if that -# fails just recompiles from source. +# Installs SourceKitten from source (Intended to be used with +# swift docker image) set -e -SOURCEKITTEN_PKG_PATH="/tmp/SourceKitten.pkg" -SOURCEKITTEN_PKG_URL="https://github.com/jpsim/SourceKitten/releases/download/0.17.3/SourceKitten.pkg" - -wget --output-document=$SOURCEKITTEN_PKG_PATH $SOURCEKITTEN_PKG_URL - -if [ -f $SOURCEKITTEN_PKG_PATH ]; then - echo "SourceKitten package exists! Installing it..." - sudo installer -pkg $SOURCEKITTEN_PKG_PATH -target / -else - echo "SourceKitten package doesn't exist. Compiling from source..." && - git clone https://github.com/jspim/SourceKitten.git /tmp/SourceKitten && - cd /tmp/SourceKitten && - sudo make install -fi +git clone https://github.com/jpsim/SourceKitten.git /tmp/SourceKitten && +cd /tmp/SourceKitten && +make install diff --git a/Scripts/install_swiftlint.sh b/Scripts/install_swiftlint.sh index 6a2f250..4b8299d 100755 --- a/Scripts/install_swiftlint.sh +++ b/Scripts/install_swiftlint.sh @@ -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 |