Reputation: 20559
I am using lein exec plugin tasks as tasks in my :release-tasks vector but every time one of those lein exec tasks finishes the rest of the release tasks don't run.
My :release-tasks are:
$ lein pprint :release-tasks
[["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["exec" "bin/set-version-from-project.clj"]
["vcs" "commit"]
["vcs" "tag"]
["exec" "bin/make-bin.clj"]
["change" "version" "leiningen.release/bump-version"]
["exec" "bin/set-version-from-project.clj"]
["vcs" "commit"]
["vcs" "push"]]
And when I release it stops at the first exec task like so but returns a successful exit code:
$ DEBUG=1 lein release
Leiningen's classpath: /Users/paul/.lein/self-installs/leiningen-2.5.0-standalone.jar
Applying task release to []
Applying task change to [version leiningen.release/bump-version release]
Applying task exec to [bin/set-version-from-project.clj]
$ echo $?
0
And when I run the exec task by itself it runs correctly and returns a successful exit code:
$ lein exec bin/set-version-from-project.clj
$ echo $?
0
How can I get all of these :release-tasks to run in order?
Upvotes: 2
Views: 851
Reputation: 20559
I switched from the lein-exec plugin to the lein-oneoff plugin. It's a similar plugin and works with :release-tasks.
Here's the working :release-tasks.
$ lein pprint :release-tasks
[["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["oneoff" "bin/set-version-from-project.clj"]
["vcs" "commit"]
["vcs" "tag"]
["oneoff" "bin/make-bin.clj"]
["change" "version" "leiningen.release/bump-version"]
["oneoff" "bin/set-version-from-project.clj"]
["vcs" "commit"]
["vcs" "push"]]
Upvotes: 2