Created
November 7, 2013 16:01
-
-
Save madwork/7357023 to your computer and use it in GitHub Desktop.
Capistrano (version 2), deploy with Bower. Install into shared directory
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
before "bower:install", "bower:symlink" | |
after "bower:install", "bower:prune" | |
before "deploy:assets:precompile", "bower:install" | |
namespace :bower do | |
desc "Symlink shared components to current release" | |
task :symlink, roles: :app do | |
run "mkdir -p #{shared_path}/components" | |
run "ln -nfs #{shared_path}/components #{latest_release}/vendor/assets/components" | |
end | |
desc "Install the current Bower environment" | |
task :install, roles: :app do | |
run "cd #{latest_release} && /opt/node/bin/node /opt/node/bin/bower install --production --quiet" | |
end | |
desc "Uninstalls local extraneous packages" | |
task :prune, roles: :app do | |
run "cd #{latest_release} && /opt/node/bin/node /opt/node/bin/bower prune" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment