-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improved install, reinstall and upgrade vendor feature (speeds up dep…
…loyments with shared vendors)
- Loading branch information
Showing
1 changed file
with
24 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,9 @@ | |
# Whether to run the bin/vendors script to update vendors | ||
set :update_vendors, false | ||
|
||
# run bin/vendors script in mode (upgrade, install (faster if shared /vendor folder) or reinstall) | ||
set :vendors_mode, reinstall | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
cordoval
Author
Contributor
|
||
|
||
# Whether to run cache warmup | ||
set :cache_warmup, true | ||
|
||
|
@@ -140,10 +143,20 @@ | |
end | ||
|
||
namespace :vendors do | ||
desc "Runs the bin/vendors script to update the vendors" | ||
task :update do | ||
desc "Runs the bin/vendors script to install the vendors (fast if already installed)" | ||
task :install do | ||
run "cd #{latest_release} && #{php_bin} bin/vendors install" | ||
end | ||
|
||
desc "Runs the bin/vendors script to reinstall the vendors" | ||
task :reinstall do | ||
run "cd #{latest_release} && #{php_bin} bin/vendors install --reinstall" | ||
end | ||
|
||
desc "Runs the bin/vendors script to upgrade the vendors" | ||
task :upgrade do | ||
run "cd #{latest_release} && #{php_bin} bin/vendors update" | ||
end | ||
end | ||
|
||
namespace :cache do | ||
|
@@ -295,7 +308,15 @@ | |
if update_vendors | ||
# share the children first (to get the vendor symlink) | ||
deploy.share_childs | ||
symfony.vendors.update # 1. Update vendors | ||
if vendors_mode == "upgrade" | ||
symfony.vendors.upgrade # 1. Upgrade vendors (upgrade to latest) | ||
elseif vendors_mode == "install" | ||
symfony.vendors.install # 1. Install vendors (fast when shared vendors) | ||
elseif vendors_mode == "reinstall" | ||
symfony.vendors.reinstall # 1. Reinstall vendors (slow) | ||
else | ||
symfony.vendors.reinstall # 1. Reinstall vendors (slow) | ||
end | ||
end | ||
|
||
if assets_install | ||
|
Should'nt this be:
?