Skip to content

Commit

Permalink
Add support for Swift 6.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
vzsg committed Dec 19, 2024
1 parent 5ed3142 commit ccf5b9a
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ $ heroku create --buildpack vapor/vapor

$ git push heroku main
remote: -----> Swift app detected
remote: -----> Using Swift 6.0.2 (default)
remote: -----> Using Swift 6.0.3 (default)
remote: -----> Installing swiftenv
remote: -----> Installing Swift 6.0.2
remote: -----> Installing Swift 6.0.3
...
```

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

### Specify a Swift version

The buildpack defaults to Swift 6.0.2, but is compatible with Swift 5.9.1 - 6.0.1.
The buildpack defaults to Swift 6.0.3, but is compatible with Swift 5.9.1 - 6.0.2 as well.

If you need to use a specific older version of the Swift toolchain from this range, you can pin the version number using a file called `.swift-version` in the root of the project folder (or at the configured `PACKAGE_DIR` setting), 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 @@ -28,7 +28,7 @@ else
echo "No PACKAGE_DIR config variable is set. Using the repo root."
fi

SWIFT_VERSION="6.0.2"
SWIFT_VERSION="6.0.3"
SWIFT_BUILD_CONFIGURATION="release"
SWIFT_BUILD_FLAGS=""

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

'ubuntu14.04' )
echo
echo " ! Swift 6.0 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 6.0 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' )
echo
echo " ! Swift 6.0 does not support Ubuntu 18.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
;;

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

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

'ubuntu24.04' )
URL="https://swift.org/builds/swift-6.0.3-release/ubuntu2404/swift-6.0.3-RELEASE/swift-6.0.3-RELEASE-ubuntu24.04.tar.gz"
;;

* )
;;
esac

0 comments on commit ccf5b9a

Please sign in to comment.