Created
May 3, 2012 02:49
-
-
Save armstrjare/2582670 to your computer and use it in GitHub Desktop.
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
task :precompile, :roles => :web, :except => { :no_release => true } do | |
needs_recompile = if current_revision | |
from = source.next_revision(current_revision) | |
capture("cd #{latest_release} && #{source.local.log(from)} #{asset_precompile_locations.join(' ')} | wc -l").to_i > 0 | |
end | |
# Symlink public/assets to the shared assets directory. | |
symlink | |
if needs_recompile | |
recompile | |
else | |
logger.info "Skipping asset pre-compilation because there were no asset changes" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment