Skip to content

Instantly share code, notes, and snippets.

@kylef
Last active April 15, 2020 10:29
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save kylef/5c0475ff02b7c7671d2a to your computer and use it in GitHub Desktop.
Save kylef/5c0475ff02b7c7671d2a to your computer and use it in GitHub Desktop.
#!/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
@dgholz
Copy link

dgholz commented Oct 3, 2016

I'm trying to use 3.0, and I see this in my macOS Travis build:

[…]
3.0 has been installed.
swiftenv: version `3.0' is not installed

Which stops the job before tests run. Is there something I should do to install 3.0 the way swiftenv expects?

@wongzigii
Copy link

@dgholz I am getting same issue.

@dgholz
Copy link

dgholz commented Oct 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment