Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #29 from weaverryan/update_vendors

Adding the update_vendors functionality
  • Loading branch information...
commit 6ee6e992d8a7a0f98730640263a8d9671198f294 2 parents 5c8b4f7 + de0cb78
@everzet authored
Showing with 19 additions and 3 deletions.
  1. +19 −3 lib/symfony2.rb
View
22 lib/symfony2.rb
@@ -18,6 +18,9 @@
# Use AsseticBundle
set :dump_assetic_assets, false
+# Whether to run the bin/vendors script to update vendors
+set :update_vendors, false
+
# Dirs that need to remain the same between deploys (shared dirs)
set :shared_children, [log_path, web_path + "/uploads"]
@@ -131,6 +134,13 @@
end
end
+ namespace :vendors do
+ desc "Runs the bin/vendors script to update the vendors"
+ task :update do
+ run "cd #{latest_release} && ./bin/vendors install"
+ end
+ end
+
namespace :cache do
desc "Clears project cache."
task :clear do
@@ -246,9 +256,15 @@
# After finalizing update:
after "deploy:finalize_update" do
- symfony.cache.warmup # 1. Warmup clean cache
- symfony.assets.install # 2. Publish bundle assets
+ if update_vendors
+ # share the children first (to get the vendor symlink)
+ deploy.share_childs
+ symfony.vendors.update # 1. Update vendors
+ end
+
+ symfony.cache.warmup # 2. Warmup clean cache
+ symfony.assets.install # 3. Publish bundle assets
if dump_assetic_assets
- symfony.assetic.dump # 3. Dump assetic assets
+ symfony.assetic.dump # 4. Dump assetic assets
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.