From dc58820e81fd4f03e793236eb1a7d04e827f6a9f Mon Sep 17 00:00:00 2001 From: Hugo Duncan Date: Mon, 14 Mar 2011 00:41:53 -0400 Subject: [PATCH] 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) --- src/pallet/task/converge.clj | 8 +++++++- src/pallet/task/lift.clj | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/pallet/task/converge.clj b/src/pallet/task/converge.clj index fb784c61..049554eb 100644 --- a/src/pallet/task/converge.clj +++ b/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)))))))) diff --git a/src/pallet/task/lift.clj b/src/pallet/task/lift.clj index d4332df4..3d9d137c 100644 --- a/src/pallet/task/lift.clj +++ b/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))))))))