Slide 359
Slide 359 text
require 'mina/git'!
!
set :repository, 'git://...'!
set :env_config, YAML.load_file('./config/env.yml')!
set :environment, ENV['on'] || env_config.fetch('default')!
!
desc 'Sets up Mina to deploy to the requested environment'!
task :environment do!
env_config.fetch(environment).each do |key, value|!
set key.to_sym, value.to_s!
end!
end!
!
task :setup => :environment do!
end!
!
desc "Deploys the current version to the server."!
task :deploy => :environment do!
deploy do!
invoke :'git:clone'!
invoke :'deploy:link_shared_paths'!
!
to :launch do!
end!
end!
end
desc "Deploys the current version to the server."!
task :deploy => :environment do!
deploy do!
invoke :'git:clone'!
invoke :'deploy:link_shared_paths'!
!
to :launch do!
end!
end!
end
deploy.rb