forked from pangloss/sprockets-rails
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added capistrano deploy tasks mirror rake tasks install_script and in…
…stall_assets
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
def run_sprockets_rake_task(task) | ||
rake = fetch(:rake, 'rake') | ||
rails_env = fetch(:rails_env, 'production') | ||
`cd #{current_release}; #{rake} RAILS_ENV=#{rails_env} sprockets:#{task}` | ||
end | ||
|
||
namespace :sprockets do | ||
desc "Generate and install the Sprockets concatenated JavaScript file" | ||
task :install_script, :roles => :app do | ||
run_sprockets_rake_task 'install_script' | ||
end | ||
|
||
desc "Install any assets provided by Sprockets scripts" | ||
task :install_assets, :roles => :app do | ||
run_sprockets_rake_task 'install_assets' | ||
end | ||
end |