Merge remote branch 'JulianBirch/master'
This commit is contained in:
commit
2f73e7dcef
2 changed files with 18 additions and 2 deletions
8
leiningen-core/src/leiningen/core/project.clj
Normal file → Executable file
8
leiningen-core/src/leiningen/core/project.clj
Normal file → Executable file
|
@ -90,7 +90,13 @@
|
||||||
(defn- profile-key-merge
|
(defn- profile-key-merge
|
||||||
"Merge profile values into the project map based on their type."
|
"Merge profile values into the project map based on their type."
|
||||||
[key result latter]
|
[key result latter]
|
||||||
(cond (= :dependencies key)
|
(cond (-> result meta :displace)
|
||||||
|
latter
|
||||||
|
|
||||||
|
(-> latter meta :replace)
|
||||||
|
latter
|
||||||
|
|
||||||
|
(= :dependencies key)
|
||||||
(merge-dependencies result latter)
|
(merge-dependencies result latter)
|
||||||
|
|
||||||
(= :repositories key)
|
(= :repositories key)
|
||||||
|
|
12
leiningen-core/test/leiningen/core/test/project.clj
Normal file → Executable file
12
leiningen-core/test/leiningen/core/test/project.clj
Normal file → Executable file
|
@ -59,4 +59,14 @@
|
||||||
(-> {:resources-path ["resources"]
|
(-> {:resources-path ["resources"]
|
||||||
:profiles {:blue {:resources-path ["blue-resources"]}}}
|
:profiles {:blue {:resources-path ["blue-resources"]}}}
|
||||||
(merge-profiles [:qa :tes :blue])
|
(merge-profiles [:qa :tes :blue])
|
||||||
:resources-path)))))
|
:resources-path)))
|
||||||
|
(is (= ["/etc/myapp" "test/hi" "blue-resources"]
|
||||||
|
(-> {:resources-path ^:displace ["resources"]
|
||||||
|
:profiles {:blue {:resources-path ["blue-resources"]}}}
|
||||||
|
(merge-profiles [:qa :tes :blue])
|
||||||
|
:resources-path)))
|
||||||
|
(is (= ["replaced"]
|
||||||
|
(-> {:resources-path ["resources"]
|
||||||
|
:profiles {:blue {:resources-path ^:replace ["replaced"]}}}
|
||||||
|
(merge-profiles [:blue :qa :tes ])
|
||||||
|
:resources-path)))))
|
||||||
|
|
Loading…
Reference in a new issue