Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix issue #1 - abort on first error with code

  • Loading branch information...
commit 0fd84425c60dc20a5e2c398672e31695e136de55 1 parent 3c31a9b
@kumarshantanu authored
Showing with 10 additions and 5 deletions.
  1. +1 −1  project.clj
  2. +9 −4 src/leiningen/sub.clj
View
2  project.clj
@@ -1,3 +1,3 @@
-(defproject lein-sub "0.1"
+(defproject lein-sub "0.1.1-SNAPSHOT"
:description "Leiningen Subprojects plugin"
:dev-dependencies [[org.clojure/clojure "1.2.1"]])
View
13 src/leiningen/sub.clj
@@ -2,6 +2,13 @@
(:use [leiningen.core :only [apply-task read-project task-not-found]]))
+(defn run-sub-proj
+ [sub-proj-dir]
+ (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)))
+
+
(defn sub
"Run task for all subprojects"
[project task-name & args]
@@ -11,7 +18,5 @@
:sub [\"modules/dep1\" \"modules/proj-common\"]
Note: Each sub-project directory should have its own project.clj file")
- (doseq [sub-proj-dir (:sub project)]
- (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)))))
+ (reduce or
+ (map run-sub-proj (:sub project)))))
Please sign in to comment.
Something went wrong with that request. Please try again.