technomancy/leiningen — Issue #392: Profile accessible from the target project
Author: JulianBirch
Created: 2012-02-05 19:58:02+00:00
State: open

Forgive me for this being vague. This actually came up in a pull request I did for lein-ring, but it probably applies even more so to lein run. If we've got a solid way of handling environmental differences in profiles, it seems that having a general way of communicating this information to the target project would be desirable.

I'm not sure if this is really a general feature idea, or whether it's sufficient to implement it in lein-run. Possible approaches:
* Allow a lein run alias to specify ^:profile-aware, which passes in the profile as the first parameter e.g. (defn run [profile & args])
* Have a directive of "profile variable" where the variable gets redefined to the profile just before the alias is invoked.