Skip to content

Instantly share code, notes, and snippets.

@hugoduncan
Created April 10, 2014 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugoduncan/10376867 to your computer and use it in GitHub Desktop.
Save hugoduncan/10376867 to your computer and use it in GitHub Desktop.
add profiles in leiningen plugin
(ns lein-test-env.plugin)
(def profiles
{:aws {:pallet/test-env {}
:dependencies '[[com.palletops/pallet-aws "0.2.0"]
[ch.qos.logback/logback-classic "1.1.1"]
[org.slf4j/jcl-over-slf4j "1.7.6"]]}})
(defn middleware
"Middleware to add test-env profiles"
[project]
(-> project
(update-in [:profiles] merge profiles)
(vary-meta update-in [:without-profiles :profiles] merge profiles)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment