Using Xcode 9 and Swift 4 as well as vapor heroku push / vapor heroku init, I receive:
-----> Swift app detected
Cloning into 'swiftenv'...
Swift 3 Heroku Installer
Version: 3.1.1
Operating System: ubuntu1404
Installing Swiftenv
Cloning into '/app/.swiftenv'...
Installing Swift
Downloading https://swift.org/builds/swift-3.1.1-release/ubuntu1604/swift-3.1.1-RELEASE/swift-3.1.1-RELEASE-ubuntu16.04.tar.gz
/tmp/swiftenv-3.1.1- /tmp/build_d
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
/tmp/build_d
3.1.1 has been installed.
ā
Done
-----> Installing clang-3.7.0
precompile
-----> Building Package ... this will take a while
swift-build: error: Package requires minimum Swift tools version 4.0.0. Current Swift tools version is 3.1.0
! Push rejected, failed to compile Swift app.
! Push failed
In the Package.swift file it says:
// swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "name",
products: [
.library(name: "App", targets: ["App"]),
.executable(name: "Run", targets: ["Run"])
],
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", .upToNextMajor(from: "2.1.0")),
.package(url: "https://github.com/vapor/fluent-provider.git", .upToNextMajor(from: "1.2.0")),
],
targets: [
.target(name: "App", dependencies: ["Vapor", "FluentProvider"],
exclude: [
"Config",
"Public",
"Resources",
]),
.target(name: "Run", dependencies: ["App"]),
.testTarget(name: "AppTests", dependencies: ["App", "Testing"])
]
)
Other than that it is literally the initial api template project. What am I missing? Help is very appreciated.