Skip to content

Commit

Permalink
Pass any :environment key in project.clj to the converge and lif tasks
Browse files Browse the repository at this point in the history
In order to allow environment definitions in project.clj, and to enable
environments to be supplied by the cake context feature, the :environment
key values from project.clj are passed to the converge and lift commands
invoked by the converge and lift tasks (used by the lein and cake plugins)
  • Loading branch information
hugoduncan committed Mar 14, 2011
1 parent 001bd0b commit dc58820
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/pallet/task/converge.clj
Expand Up @@ -31,4 +31,10 @@
[request & args] [request & args]
(let [args (build-args args)] (let [args (build-args args)]
(apply core/converge (apply core/converge
(concat args (apply concat (dissoc request :config :project)))))) (concat args
(apply concat
(->
request
(dissoc :config :project)
(assoc :environment
(-> request :project :environment))))))))
8 changes: 7 additions & 1 deletion src/pallet/task/lift.clj
Expand Up @@ -31,4 +31,10 @@
[request & args] [request & args]
(let [args (build-args args)] (let [args (build-args args)]
(apply core/lift (apply core/lift
(concat args (apply concat (dissoc request :config :project)))))) (concat args
(apply concat
(->
request
(dissoc :config :project)
(assoc :environment
(-> request :project :environment))))))))

0 comments on commit dc58820

Please sign in to comment.