In trying to setup staging of various environments, I am having a
problem setting the variables when other tasks are called.
In deploy.rb I have:
for safety, set to development in case env is not set.
set :rails_env, “development”
set :application, “development”
desc “setup test settings”
task :test do
set :rails_env, “test” # override :staging default
set :application, “test”
show
end
task :show do
puts “env = #{rails_env}”
puts “application = #{application}”
end
when I run cap test update_code I get the following:
- executing task test
- executing task show
env = test
application = test - executing task update_code
- querying latest revision…
- executing "if [[ ! -d /u/apps/development/releases/
20070712213744 ]]; then\n svn co --no-auth-cache -q -
r460 blah blah
env and application are set, but the application directory is still /
u/
apps/development/…
Is there a scope problem? is there an operator problem? This has me
snowed! I know the answer is simple.
Thanks for help or a link for the solution…
Cheers,
Paul