Liking cljdoc? Tell your friends :D

deps-library

Version Badge


To publish a small Clojure library to Clojars should be a simple thing.

As a library author, my needs are simple:

  1. Bump the version when ready for a release
  2. Ship the code to Clojars

With deps-library this is possible using just one small config file. From that we create a pom.xml (using garamond) and thin jar (using depstar), and deploy to clojars (using deps-deploy).

This library is deployed using itself.

Usage

Create a release.edn file in your project root, eg:

{:group-id "mhuebert"
 :artifact-id "deps-library"
 :scm-url "https://github.com/mhuebert/deps-library"}

Add a :release alias to your deps.edn as follows:

:aliases
 {:release
  {:extra-deps {mhuebert/deps-library {:mvn/version "VERSION"}}
   :main-opts ["-m" "deps-library.release"]}}

Create an initial version tag (if you haven't already)

git tag v0.1.0

To bump versions:

clj -A:release tag <patch, minor, major>

To deploy: (requires CLOJARS_USERNAME and CLOJARS_PASSWORD environment variables set)

clj -A:release

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close