如何在 Travis 中获取项目版本-CI

How to get project-version in Travis-CI

我有一个用 Travis-CI 构建和测试的 Clojure 项目。我可以将工件(一个 .jar 文件)上传回我的 Github 帐户,但我需要删除版本号。只要知道文件名就很容易,但我希望能够使用 project.clj 文件中的版本号。

那么问题来了: 如何配置 .travis.yml 以从我的 Clojure 项目中的 project.clj 获取版本号,以便稍后在构建中使用它?

这里有几个选项可用,具体取决于您构建项目的方式。

how to get the version of the current clojure project in the repl

Embed version string from leiningen project in application