Created
April 25, 2013 09:42
-
-
Save iammichiel/5458666 to your computer and use it in GitHub Desktop.
Capifony deployment. A ajouter dans le fichier Capfile.
This file contains hidden or 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
namespace :lilweb do | |
namespace :evolutions do | |
desc "Apply database evolutions" | |
task :apply do | |
run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} #{symfony_console} lilweb:evolutions:apply #{console_options}'" | |
capifony_puts_ok | |
end | |
end | |
namespace :deploy do | |
desc "Deploys the configuration file on the remote servers" | |
task :upload_parameters do | |
origin_file = parameters_dir + "/" + parameters_file if parameters_dir && parameters_file | |
if origin_file && File.exists?(origin_file) | |
ext = File.extname(parameters_file) | |
relative_path = "app/config/parameters" + ext | |
if shared_files && shared_files.include?(relative_path) | |
destination_file = shared_path + "/" + relative_path | |
else | |
destination_file = latest_release + "/" + relative_path | |
end | |
try_sudo "mkdir -p #{File.dirname(destination_file)}" | |
top.upload(origin_file, destination_file) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment