Fork me on GitHub

@roberto: late response, but I've had good luck using to introspect the project version


this is awesome


Yeah, trying to figure out all that profile-injection stuff and plugins really makes my head hurt. Versioneer makes it easy and it works from both lein run and a compiled uberjar


I also had some luck using humble old lein pprint before I stumbled on versioneer (in the context of deployment scripts) - you can lein pprint :version to get your version number (as a quoted string)


Actually I have a somewhat-related question I was hoping to get help with. When I override :release-tasks for my project, I can substitute in some variables from the project map, so like using the lein-shell plugin, I can have a release task like this:

:release-tasks [["shell" "echo" "Hello, world from ${:name} version ${:version}"]]


Can anyone tell me what the mechanism is that does that string substitution, and especially if there is a way to hook into it with a command I'm specifying via :aliases? What I'd like is to have the -main function I'm calling from my alias be passed the project name and version as arguments


Is this the kind of thing I need to write a plugin for?


@timgilbert: this comes from a lein-shell feature, rather than coming from Leiningen unfortunately


I’d love to have something in Leiningen where I can reference parts of project.clj in other parts


Would be tricky to break the cycle though


I did see something about putting functions in project.clj that take a project map and return a value, but I couldn’t make them work, or find any docs on them