You can clone with
HTTPS or Subversion.
lein-sub doesn't currently work for me because it doesn't carry exit codes from tasks, so if I have failed tests on some of the subprojects it will still exit with 0 and CI will count the build as successful.
fix issue #1 - abort on first error with code
I have pushed the fix to master, which should hopefully work. Can you try it out from there? The version number is 0.1.1-SNAPSHOT in project.clj now.
issue #1 - treat 0 as nil
issue #1 - treat all 0's as nil
Leiningen isn't that smart. Returning a number 1 won't work. I think you should use leiningen.core/exit
issue #1 - use core/exit to return status
Oh wait, I've had 0.1 on my classpath. Now, fixing a stupid mistake:
From 99bb0f2321db13d553399dae7e6325d95453f81e Mon Sep 17 00:00:00 2001
From: myfreeweb <firstname.lastname@example.org>
Date: Sun, 16 Oct 2011 14:11:36 +0400
Subject: [PATCH] fix
src/leiningen/sub.clj | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/leiningen/sub.clj b/src/leiningen/sub.clj
index 30c3614..643b96b 100644
@@ -4,8 +4,8 @@
- (println "Reading project from " sub-proj-dir)
+ [sub-proj-dir task-name args]
+ (println "Reading project from" sub-proj-dir)
(let [sub-project (read-project (str sub-proj-dir "/project.clj"))]
(apply-task task-name sub-project args task-not-found)))
@@ -23,5 +23,5 @@ Note: Each sub-project directory should have its own project.clj file")
(let [a (if (= 0 a) nil a)
b (if (= 0 b) nil b)]
(or a b)))
- (map run-sub-proj (:sub project)))]
+ (map #(run-sub-proj % task-name args) (:sub project)))]
issue #1 - pass task-name and args to run-sub-proj
Cool, thanks. Don't forget to deploy it to clojars!
Thanks! Pushed 0.1.1 to Clojars.