Embed version string from leiningen project in application

前端 未结 5 1023
执念已碎
执念已碎 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:33

    if you build a jar file you can extract the current version from the jar file.

    otherwise if you are not doing AOT then you can read the project.clj file (because it's a map) and then extract the version.

    I certainty hope there is a more elegant solution short of writing a leiningen plugin for this (unless someone else wants to write this, hint hint..)

提交回复
热议问题