Created
August 30, 2012 05:51
-
-
Save jmather/3522951 to your computer and use it in GitHub Desktop.
Remove dev only files in production via capifony
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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