Permalink
Browse files

Merge branch 'asset_paths' of https://github.com/cgriego/capistrano i…

…nto cgriego-asset_paths
  • Loading branch information...
2 parents 88bf4c1 + 07558ca commit 3de81caec952bc2f99a310c4f0081a1a86c1d7d8 @leehambley leehambley committed Nov 15, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/capistrano/recipes/deploy.rb
@@ -228,7 +228,8 @@ def try_runner(*args)
public/stylesheets, and public/javascripts so that the times are \
consistent (so that asset timestamping works). This touch process \
is only carried out if the :normalize_asset_timestamps variable is \
- set to true, which is the default.
+ set to true, which is the default The asset directories can be overridden \
+ using the :public_children variable.
DESC
task :finalize_update, :except => { :no_release => true } do
run "chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
@@ -246,7 +247,7 @@ def try_runner(*args)
if fetch(:normalize_asset_timestamps, true)
stamp = Time.now.utc.strftime("%Y%m%d%H%M.%S")
- asset_paths = %w(images stylesheets javascripts).map { |p| "#{latest_release}/public/#{p}" }.join(" ")
+ asset_paths = fetch(:public_children, %w(images stylesheets javascripts)).map { |p| "#{latest_release}/public/#{p}" }.join(" ")
run "find #{asset_paths} -exec touch -t #{stamp} {} ';'; true", :env => { "TZ" => "UTC" }
end
end

0 comments on commit 3de81ca

Please sign in to comment.