Skip to content
This repository
Browse code

Adding the update_vendors functionality

  • Loading branch information...
commit de0cb78fd8849c9d2a56247d26e285c4abe6016c 1 parent 7815cdb
Ryan Weaver weaverryan authored

Showing 1 changed file with 19 additions and 3 deletions. Show diff stats Hide diff stats

  1. +19 3 lib/symfony2.rb
22 lib/symfony2.rb
@@ -12,6 +12,9 @@
12 12 # Use AsseticBundle
13 13 set :dump_assetic_assets, false
14 14
  15 +# Whether to run the bin/vendors script to update vendors
  16 +set :update_vendors, false
  17 +
15 18 # Dirs that need to remain the same between deploys (shared dirs)
16 19 set :shared_children, [app_path + "/logs", web_path + "/uploads"]
17 20
@@ -125,6 +128,13 @@
125 128 end
126 129 end
127 130
  131 + namespace :vendors do
  132 + desc "Runs the bin/vendors script to update the vendors"
  133 + task :update do
  134 + run "cd #{latest_release} && ./bin/vendors install"
  135 + end
  136 + end
  137 +
128 138 namespace :cache do
129 139 desc "Clears project cache."
130 140 task :clear do
@@ -240,9 +250,15 @@
240 250
241 251 # After finalizing update:
242 252 after "deploy:finalize_update" do
243   - symfony.cache.warmup # 1. Warmup clean cache
244   - symfony.assets.install # 2. Publish bundle assets
  253 + if update_vendors
  254 + # share the children first (to get the vendor symlink)
  255 + deploy.share_childs
  256 + symfony.vendors.update # 1. Update vendors
  257 + end
  258 +
  259 + symfony.cache.warmup # 2. Warmup clean cache
  260 + symfony.assets.install # 3. Publish bundle assets
245 261 if dump_assetic_assets
246   - symfony.assetic.dump # 3. Dump assetic assets
  262 + symfony.assetic.dump # 4. Dump assetic assets
247 263 end
248 264 end

0 comments on commit de0cb78

Please sign in to comment.
Something went wrong with that request. Please try again.