Fork me on GitHub
#leiningen
<
2016-06-09
>
keeth23:06:48

howdy! i’ve deployed a couple versions of a module to clojars using ‘lein deploy’ and I thought I would try ‘lein release’ instead to get the handy version bump/tag stuff. however when i try lein release :patch I get:

other:dawdle [master] keith $ lein release :patch
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
java.lang.Exception: Couldn't commit. git exit code: 1

danielcompton23:06:42

Are you using git?

keeth23:06:12

other:dawdle [master] keith $ lein pprint :release-tasks
[["vcs" "assert-committed"]
 ["change" "version" "leiningen.release/bump-version" "release"]
 ["vcs" "commit"]
 ["vcs" "tag"]
 ["deploy"]]

keeth23:06:29

seems like the bump-version step is not changing project.clj, and so the vcs.commit step is failing with ‘nothing to commit'

danielcompton23:06:04

have you put custom release tasks in there?

danielcompton23:06:19

what version of lein do you have?

danielcompton23:06:47

what is the version of your project in project.clj?

keeth23:06:00

the only customization i did to release tasks is to remove everything after deploy

danielcompton23:06:07

those steps are needed 🙂

keeth23:06:20

other:dawdle [master] keith $ lein pprint :version "0.1.2"

danielcompton23:06:23

I think you need to be on a SNAPSHOT for bump version to work

keeth23:06:41

i’ve not been using snapshots

keeth23:06:59

ok, i’ll look into that, thanks

danielcompton23:06:21

the default commands handle bumping to and from snapshots for you

danielcompton23:06:47

you could raise an issue on leiningen for better error handling/warning when you try to release on a non SNAPSHOT version