Skip to content

Commit

Permalink
allow for sub build to be executed at any level in the multiproject
Browse files Browse the repository at this point in the history
  • Loading branch information
Erick Gonzalez committed Apr 24, 2012
1 parent ee6e120 commit 83d4401
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion project.clj
@@ -1,4 +1,4 @@
(defproject lein-sub "0.2.0"
(defproject lein-sub "9.0.0-SNAPSHOT"
:description "Leiningen Subprojects plugin"
:url "https://github.com/kumarshantanu/lein-sub"
:eval-in-leiningen true)
6 changes: 3 additions & 3 deletions src/leiningen/sub.clj
Expand Up @@ -8,9 +8,9 @@
[sub-proj-dir task-name args]
(println "Reading project from" sub-proj-dir)
(let [sub-project (project/read (str sub-proj-dir "/project.clj"))
nested-subprojects (:sub sub-project)]
(if nested-subprojects
(apply sub sub-project task-name args)
nested-subprojects (map #(str sub-proj-dir "/" %1) (:sub sub-project))]
(if-not (empty? nested-subprojects)
(apply sub (assoc sub-project :sub nested-subprojects) task-name args)
(main/apply-task task-name sub-project args))))

(defn run-subproject [task-name args total-result sub]
Expand Down

0 comments on commit 83d4401

Please sign in to comment.