swiftc
)。使用JavaScript构建文件,您甚至可以指定在构建前和构建后运行的命令,比如运行新构建的程序。我一直在关注一个名为Marathon的开源项目,它是一个包管理器,他们一直在Linux上进行部署。我不确定他们取得了多少成功,但你可以在这里跟踪并提供帮助。
https://github.com/JohnSundell/Marathon/issues/37
编辑:看起来它在Linux上确实可以工作!
git clone https://github.com/JohnSundell/Marathon.git
$ cd Marathon
$ swift build -c release
$ cp -f .build/release/Marathon /usr/local/bin/marathon
关于依赖,您应该使用Swift Package Manager。
您可以查看Vapor的构建方式 - 它已准备好为Ubuntu构建应用程序。
Vapor工具箱还可以帮助您处理其他项目https://docs.vapor.codes/2.0/getting-started/install-on-ubuntu/