Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add support for a :pallet/profiles key in the project map, which auto…

…matically sets the -P option to select the profiles.
  • Loading branch information...
commit f7d80747ceef6d4b34cb2516a40d0be5814470cc 1 parent 0f084be
@davidsantiago davidsantiago authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/leiningen/pallet.clj
View
9 src/leiningen/pallet.clj
@@ -40,8 +40,13 @@
;; clause happens.
(if-let [m# (ns-resolve (the-ns '~'pallet.main) '~'pallet-task)]
(try
- (let [env# (:pallet/environment (read-string ~project-str))]
+ (let [project# (read-string ~project-str)
+ env# (:pallet/environment project#)
+ profiles# (:pallet/profiles project#)]
(m# (concat ["-project-options" ~(pr-str project)]
+ (if profiles#
+ ["-P" (clojure.string/join
+ "," (map name profiles#))])
[~@args])
:environment env#))
(finally
@@ -53,7 +58,7 @@
(println "failed to resolve pallet.main/pallet-task"))
1))))]
(if (and project (map? project))
- (compat/eval-in-project project main-form nil)
+ (compat/eval-in-project project main-form `(require 'clojure.string))
(maybe-shutdown-agents
(require 'pallet.main)
((ns-resolve (the-ns 'pallet.main) 'pallet-task) args)
Please sign in to comment.
Something went wrong with that request. Please try again.