leiningen

jmv 2022-02-04T17:00:58.273309Z

dos anyone know the particular ordering of release tasks to make lein release release as the level given? i would like to be able to say lein release minor and have it bump the minor component, commit, and tag that. releasing the current snapshot and bumping the component for the next snapshot is not a super intuitive behavior for me. some examples of what i mean 🧵

jmv 2022-02-04T17:01:29.677799Z

what i would like is

lein release major: 1.1.1-SNAPSHOT -> 2.0.0
lein release minor: 1.1.1-SNAPSHOT -> 1.2.0
lein release patch: 1.1.1-SNAPSHOT -> 1.1.2

azimpel 2022-02-04T18:35:14.665229Z

Gradle release plugin behaves similar.

azimpel 2022-02-04T18:36:07.566759Z

You could try something like this

(defproject "project-name" "1.1.1-SNAPSHOT"
:release-tasks [["vcs" "assert-committed"]
                  ["change" "version" "leiningen.release/bump-version"]
                  ["change" "version" "leiningen.release/bump-version" "release"]
                  ["vcs" "commit"]
                  ["vcs" "tag"]
                  ["deploy"]
                  ["change" "version" "leiningen.release/bump-version"]
                  ["vcs" "commit" "next dev version"]
                  ["vcs" "push"]
                  ]
)
and then 
> lein release :major
should lead to "2.0.0" version.

jmv 2022-02-04T22:07:14.308929Z

Thanks!! I will give this a shot