I have a Rakefile which has tasks for deploying or building an application. This Rakefile is used in both production and development.
I would like the build
task to know what the environment is. Can this be done without passing a parameter to the task when I run it? Can it be done with environment variables?
When in development, I need the task to look like this:
task :build => :clean do
compass compile -e development
jekyll
end
And in production, like this:
task :build => :clean do
compass compile -e production
jekyll
end