task :staging do
set :domain, 'xxx.xxx.xxx.xxx'
set :user, 'user'
set :rails_env, 'staging'
# ...
end
task :production do
set :domain, 'xxx.xxx.xxx.xxx'
set :user, 'user'
set :rails_env, 'production'
# ...
end
caseENV['on']when'production'puts"production"set:domain,'production.com'set:branch,'master'when'stg'puts"stg"set:domain,'stg.com'set:branch,'dev'elseputs"stg"set:domain,'stg.com'set:branch,'dev'end# mina deploy on=stg