swiftup: the Swift toolchain installer
swiftup allows you to easily install, and switch between multiple versions of Swift.
This project is Swift version of swiftenv.
Installation
swiftup can be easily installed by running it in your shell:
eval "$(curl -s https://raw.githubusercontent.com/mominul/swiftup/master/install.sh)"
Currently only Ubuntu is supported
Commands
install
To install a specific release of Swift, you can easily install it by specifying the version:
$ swiftup install 3.0.2
Now swiftup will install the 3.0.2 version of Swift.
To install the latest snapshot version of Swift:
$ swiftup install snapshot
You can also install a specific version of snapshot by passing its download URL directly to swiftup install
.
$ swiftup install https://swift.org/builds/development/ubuntu1610/swift-DEVELOPMENT-SNAPSHOT-2017-02-01-a/swift-DEVELOPMENT-SNAPSHOT-2017-02-01-a-ubuntu16.10.tar.gz
You can also create a .swift-version
file and specify your version there. After that you can then install that version by:
$ swiftup install default
show
Lists all installed Swift versions, showing an asterisk next to the currently active version.
$ swiftup show
* 3.1.1-RELEASE
DEVELOPMENT-SNAPSHOT-2017-07-30-a
* - Version currently in use
global
It will set the global toolchain version.
$ swiftup show
* 3.1.1-RELEASE
DEVELOPMENT-SNAPSHOT-2017-07-30-a
* - Version currently in use
$ swiftup global DEVELOPMENT-SNAPSHOT-2017-07-30-a
which
It will display which binary will be run for a given command.