Embed version string from leiningen project in application

前端 未结 5 1031
执念已碎
执念已碎 2020-12-16 16:44

I want to be able to query or embed the version string set by the leiningen project and display that value to user. Uses include displaying the version string from the CLI,

5条回答
  •  爱一瞬间的悲伤
    2020-12-16 17:30

    If you're running inside Leiningen using lein run or the like, it's available as a system property: (System/getProperty "myproject.version"). If you're producing a jar you need to read pom.properties.

提交回复
热议问题