Releasing clojure libs

Releasing libraries is a tedious but important task. There is lots to do and lots to screw up:

  • Tagging the release state
  • Making a clean build
  • Signing the artifacts
  • Pushing them to some repository
  • Bumping the version to the next snapshot iteration
  • And so on and so forth…

Having a dark past in the java world I looked for something like the maven release plugin for leiningen, which automates the whole process quite nicely. Turns out there exist a lot of release plugins. Right now clojars lists 50 results for the search term release.

I tried them out one by one and none of the candidates really worked. It took a while but now I found something that worked really reliably for month now and makes releases a breeze. So I thought I share it here. And if it is just for my future self:

(defproject greatest.lib/ever "0.0.1-SNAPSHOT"
      :lein-release {:deploy-via :clojars}
      :profiles     {:dev {:plugins [[lein-release/lein-release "1.0.9"]]}})

See also