Skip to content

Instantly share code, notes, and snippets.

@viccherubini
Created October 30, 2013 11:07
Show Gist options
  • Save viccherubini/7230857 to your computer and use it in GitHub Desktop.
Save viccherubini/7230857 to your computer and use it in GitHub Desktop.
Advanced Web Applications Using Symfony Capfile
load 'deploy'
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy'
namespace :deploy do
task :install_composer, :roles => :web do
run "curl -s https://getcomposer.org/installer | php -- --install-dir=#{latest_release}"
end
task :install_phing, :roles => :web do
run "wget -qO #{latest_release}/phing.phar http://www.phing.info/get/phing-2.6.1.phar"
end
task :build, :roles => :web do
run "php #{latest_release}/phing.phar -f #{latest_release}/build.xml " +
"-Dbuild_settings_file=#{shared_path}/system/build.settings deploy"
end
end
before 'deploy:build', 'deploy:install_composer'
before 'deploy:build', 'deploy:install_phing'
before 'deploy:create_symlink', 'deploy:build'
after 'deploy:update', 'deploy:cleanup'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment