WormBase / pseudoace

Modelling the WormBase ACeDB database in datomic.
4 stars 3 forks source link

Add ability to programmatically get the current version of a clojure library/project #61

Closed mgrbyte closed 7 years ago

mgrbyte commented 7 years ago

In some projects, it's desirable to get the version of a given project, often the same project being developed. This is used in web-app for example to show the current version.

When running from a lein based project, the following java interop call works:

(System/getProperty "<artefactId>.version")

Where <artefact-name> is the same as the artefactId in maven parlance (i.e in clojure projects configured with lein, it's the value "VERSION" we want from (defproject groupID/artefactId "VERSION").

When running from JAR file, this doesn't work; but there are other work-arounds/methods for obtaining the version.

We should an API to psuedoace.utils for getting this, such that we don't have to repeat ourselves if we need this feature in > 1 project.

Primarily motivated by, and intended to fix this.

mgrbyte commented 7 years ago

@sibyl229 @a8wright Any thoughts/objections if I implement this to fix the swagger validation regression?