Skip to content

Commit

Permalink
Vendor swiftenv installation script
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Apr 16, 2021
1 parent 77c2fd8 commit 62706f3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ language: generic
sudo: required
dist: trusty
env:
- SWIFT_VERSION=5.0
- SWIFT_VERSION=5.0 SWIFTENV_ROOT="$HOME/.swiftenv" PATH="$SWIFTENV_ROOT/bin:$SWIFTENV_ROOT/shims:$PATH"
install:
- eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
- ./scripts/install_swiftenv.sh
script:
- swift build
15 changes: 15 additions & 0 deletions scripts/install_swiftenv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

# Automatically installs swiftenv and run's swiftenv install.
# This script was designed for usage in CI systems.

git clone --depth 1 https://github.com/kylef/swiftenv.git ~/.swiftenv
export SWIFTENV_ROOT="$HOME/.swiftenv"
export PATH="$SWIFTENV_ROOT/bin:$SWIFTENV_ROOT/shims:$PATH"

if [ -f ".swift-version" ] || [ -n "$SWIFT_VERSION" ]; then
swiftenv install -s
else
swiftenv rehash
fi

0 comments on commit 62706f3

Please sign in to comment.