[ANN] Metav: A lib helping versioning and releasing tools.deps projects, feedbacks welcome

Hi there,

I’ve just released an alpha version of Metav, a library that help the release and versioning process of Clojure projects, particularly the one using tools.deps and a Monorepo style (see Rationale).
Feedbacks are welcome :slight_smile:



I think the problem is right! I don’t like the feeling when set my new version manually in a file, to build a new versioned artifact; and having to manually ensure that I keep VCS in sync with the artifact. Pulling that information directly from VCS seems like a better solution!

Thanks for the feedback @teodorlu,
Deriving the version from git and being able to link an artifact to a SCM ref is an important concern for me. There are some solutions in the leiningen ecosystem like:

The monorepo concern is also a different one with solutions like:

I like tools.deps simplicity and composability and wanted to mix several tools.deps modules in one repo with a simple versioning and releasing process (like the release task of lein that I’m fond of), that was the inception of Metav.


1 Like

Where is the version info stored?

Huh, didn’t know about lein release. Thanks for the link! I can stop doing that manually, now.

The version info is entirely deduced from git infos: partly from git tag and partly deduced from the git number of commits since that tag and the current state of the repo (dirty or not).

  • 1.5.2+f34b91-DIRTY -> 1.5.2 is the last tag, f34b91 the current commit’s SHA and -DIRTY because the repo has some uncommitted change.
  • 1.5.2 -> 1.5.2 is the last tag and no commits since then and no untracked or uncommitted file
  • 1.5.2+f34b91-> 1.5.2 is the last tag, f34b91 the current commit’s SHA (Metav don’t include the distance as the monorepo style may include commits not related to that module, hence that info is non pertinent) and no untracked or uncommitted file

A feature (not yet implemented but I’ll do in the near future) is the possibility of “spitting” metadata (version, path in the monorepo, timestamp, etc.) in a meta.edn file. The typical use-case would be to include that file in an artefact for the version infos to be published at runtime (in a webapp, in log, etc.), with some minor risk of desynchronisation between the real version and the one in the file, particularly during development.

Please add this to the tools list at https://github.com/clojure/tools.deps.alpha/wiki/Tools when you get a chance!

Sure @alexmiller, it’s done.

Nice, that’s a pretty good versioning strategy actually. I like it. Good Job

thanks very much, i’ve looked for it for a long time

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.