使用Swift 4.1向Heroku部署Vapor 3 beta应用程序的问题

问题描述 投票:2回答:1

我正在尝试使用Vapor 3 beta和Swift 4.1部署一个新的Steam应用程序构建到Heroku,但是在构建过程中一直存在失败。我尝试用.swift-version添加4.1文件,但没有运气。

还尝试使用$ heroku buildpacks:set https://github.com/vapor-community/heroku-buildpack.git设置新的构建包

$ vapor --version
Vapor Toolbox: 3.1.4
Vapor Framework: 3.0.0-beta.3.1.3`

这些是我在终端看到的日志

$ git push heroku master
Counting objects: 50, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (40/40), done.
Writing objects: 100% (50/50), 12.55 KiB | 3.14 MiB/s, done.
Total 50 (delta 11), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Swift app detected
remote: -----> Installing clang 5.0.0
remote: -----> Installing swiftenv
remote: Cloning into 'swiftenv'...
remote: -----> Installing Swift 4.1
remote: We don't have build instructions for 4.1.
remote:  !     Push rejected, failed to compile Swift app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to serene-cliffs-74861.
remote: 
To https://git.heroku.com/serene-cliffs-74861.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/serene-cliffs-74861.git'`

在我的heroku应用程序中,我看到以下构建日志

-----> Swift app detected
-----> Installing clang 5.0.0
-----> Installing swiftenv
Cloning into 'swiftenv'...
-----> Installing Swift 4.1
We don't have build instructions for 4.1.
!     Push rejected, failed to compile Swift app.
!     Push failed`

有人可以帮我解决这个问题。

swift heroku vapor
1个回答
2
投票

由于目前还没有发布Swift 4.1,因此您需要在.swift-version文件中指定一个开发快照。例如: 4.1-DEVELOPMENT-SNAPSHOT-2018-03-01-a

© www.soinside.com 2019 - 2024. All rights reserved.