diff --git a/deployment/tasks/composer_update.cap b/deployment/tasks/composer_update.cap index 2f6b45332..0adf45108 100644 --- a/deployment/tasks/composer_update.cap +++ b/deployment/tasks/composer_update.cap @@ -6,14 +6,17 @@ namespace :composer do execute "cd ~;rm -rf ./#{fetch(:update_dir)};mkdir #{fetch(:update_dir)};" puts "\n\e[36m\e[1m> Cloning Open Orchestra" - execute "cd ~/#{fetch(:update_dir)};git clone #{fetch(:repo_url)};" + execute "cd ~/#{fetch(:update_dir)};git clone #{fetch(:repo_url)};cd #{fetch(:git_project_dir)};git checkout #{fetch(:branch)}" puts "\n\e[36m\e[1m> Updating dependencies" - execute "cd ~/#{fetch(:update_dir)}/#{fetch(:git_project_dir)};composer update --no-progress;" + execute "cd ~/#{fetch(:update_dir)}/#{fetch(:git_project_dir)};composer clear-cache;composer update --no-progress --ignore-platform-reqs;" puts "\n\e[36m\e[1m> Pushing the composer.lock to a new Git branch" execute "cd ~/#{fetch(:update_dir)}/#{fetch(:git_project_dir)};git add composer.lock;git commit -m \"auto update vendor\";git pull --rebase origin #{fetch(:branch)};git push origin #{fetch(:branch)}:auto_update_vendor" + puts "\n\e[36m\e[1m> Removing temporary files" + execute "cd ~;rm -rf #{fetch(:update_dir)}" + puts "\n\e[32mYou can now connect to Github and create a Pull Request to merge the \"auto_update_vendor\" branch into \"#{fetch(:branch)}\"\e[0m" end end