Skip to content

Commit

Permalink
Add Swift 5.10.1 support
Browse files Browse the repository at this point in the history
  • Loading branch information
vzsg committed Jun 12, 2024
1 parent e31a1c6 commit ec40b30
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ $ heroku create --buildpack vapor/vapor

$ git push heroku main
remote: -----> Swift app detected
remote: -----> Using Swift 5.10 (default)
remote: -----> Using built-in clang (Swift 5.10)
remote: -----> Using Swift 5.10.1 (default)
remote: -----> Using built-in clang (Swift 5.10.1)
remote: -----> Installing swiftenv
remote: -----> Installing Swift 5.10
remote: -----> Installing Swift 5.10.1
...
```

Expand Down Expand Up @@ -50,7 +50,7 @@ web: Run --env=production --port=$PORT

### Specify a Swift version

The buildpack defaults to Swift 5.10 and will be updated when new Swift versions are released.
The buildpack defaults to Swift 5.10.1 and will be updated when new Swift versions are released.

If you need to use a specific version of the Swift toolchain, including older versions – for example Swift 4.2.x to retain compatibility with Swift 3 projects, or a previous version as you run into issues with the latest – you can pin any version number using a file called `.swift-version` in the root of the project folder, or by setting a `SWIFT_VERSION` configuration variable on Heroku, then deploying again.

Expand Down
2 changes: 1 addition & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ENV_DIR=$3

CLANG_VERSION=7.0.1

SWIFT_VERSION="5.10"
SWIFT_VERSION="5.10.1"
SWIFT_BUILD_CONFIGURATION="release"
SWIFT_BUILD_FLAGS=""

Expand Down
38 changes: 38 additions & 0 deletions swiftenv/share/swiftenv-install/5.10.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
case "$PLATFORM" in
'osx' )
URL="https://swift.org/builds/swift-5.10.1-release/xcode/swift-5.10.1-RELEASE/swift-5.10.1-RELEASE-osx.pkg"
;;

'ubuntu14.04' )
echo
echo " ! Swift 5.10.1 does not support Ubuntu 14.04."
echo " ! Please upgrade your stack using the 'heroku stack:set' command or via the dashboard."
echo " ! If that is not an option, pin an older version of Swift."
echo
exit 1
;;

'ubuntu16.04' )
echo
echo " ! Swift 5.10.1 does not support Ubuntu 16.04."
echo " ! Please upgrade your stack using the 'heroku stack:set' command or via the dashboard."
echo " ! If that is not an option, pin an older version of Swift."
echo
exit 1
;;

'ubuntu18.04' )
URL="https://swift.org/builds/swift-5.10.1-release/ubuntu1804/swift-5.10.1-RELEASE/swift-5.10.1-RELEASE-ubuntu18.04.tar.gz"
;;

'ubuntu20.04' )
URL="https://swift.org/builds/swift-5.10.1-release/ubuntu2004/swift-5.10.1-RELEASE/swift-5.10.1-RELEASE-ubuntu20.04.tar.gz"
;;

'ubuntu22.04' )
URL="https://swift.org/builds/swift-5.10.1-release/ubuntu2204/swift-5.10.1-RELEASE/swift-5.10.1-RELEASE-ubuntu22.04.tar.gz"
;;

* )
;;
esac

0 comments on commit ec40b30

Please sign in to comment.