Browse files

Pass any :environment key in project.clj to the converge and lif tasks

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...
1 parent 001bd0b commit dc58820e81fd4f03e793236eb1a7d04e827f6a9f @hugoduncan hugoduncan committed Mar 14, 2011
Showing with 14 additions and 2 deletions.
  1. +7 −1 src/pallet/task/converge.clj
  2. +7 −1 src/pallet/task/lift.clj
View
8 src/pallet/task/converge.clj
@@ -31,4 +31,10 @@
[request & args]
(let [args (build-args args)]
(apply core/converge
- (concat args (apply concat (dissoc request :config :project))))))
+ (concat args
+ (apply concat
+ (->
+ request
+ (dissoc :config :project)
+ (assoc :environment
+ (-> request :project :environment))))))))
View
8 src/pallet/task/lift.clj
@@ -31,4 +31,10 @@
[request & args]
(let [args (build-args args)]
(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.