separate combine-profile out into its own function for dsantiago
This commit is contained in:
parent
cadfe5c92c
commit
c36274b52e
1 changed files with 5 additions and 3 deletions
|
@ -181,13 +181,15 @@
|
|||
|
||||
:else (doto latter (println "has a type mismatch merging profiles."))))
|
||||
|
||||
(defn- combine-profile [project profile]
|
||||
(vary-meta (merge-with profile-key-merge project profile)
|
||||
update-in [:included-profiles] conj profile))
|
||||
|
||||
(defn- combine-profiles [project profiles]
|
||||
;; We reverse because we want profile values to override the project, so we
|
||||
;; need "last wins" in the reduce, but we want the first profile specified by
|
||||
;; the user to take precedence.
|
||||
(reduce (fn [project profile]
|
||||
(vary-meta (merge-with profile-key-merge project profile)
|
||||
update-in [:included-profiles] conj profile))
|
||||
(reduce combine-profile
|
||||
project
|
||||
(reverse profiles)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue