Skip to content

Instantly share code, notes, and snippets.

@jmather
Created August 30, 2012 05:51
Show Gist options
  • Save jmather/3522951 to your computer and use it in GitHub Desktop.
Save jmather/3522951 to your computer and use it in GitHub Desktop.
Remove dev only files in production via capifony
set :dev_only_files, [web_path + "/app_dev.php", web_path + "/check.php", web_path + "/config.php"]
set :production, true
after 'symfony:cache:warmup', 'pff:productify'
namespace :pff do
desc "Remove app_dev.php, check.php and config.php from production deployment"
task :productify, :except => { :production => false } do
if dev_only_files
pretty_print "--> Removing app_dev.php, config.php, and check.php from web"
dev_only_files.map do |dev_file|
run "rm -f #{latest_release}/#{dev_file}"
end
puts_ok
else
pretty_print "--> We wanted to remove dev only files but none were listed"
puts_ok
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment