mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Added a :normalize_asset_timestamps property.
This is queried in finalize_update to determine whether or not to touch all of the assets. Subversion has a configuration option (use-commit-timestamps), which renders this process unnecessary if set.
This commit is contained in:
parent
1b7525e362
commit
5d1d9d9ddc
2 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
*unreleased*
|
||||
|
||||
* Added :normalize_asset_timestamps option to deployment, defaulting to true, which allows asset timestamping to be disabled [John Trupiano]
|
||||
|
||||
|
||||
*2.4.0 Preview Release #1* (2.3.101) June 5, 2008
|
||||
|
||||
* Only make deploy:start, deploy:stop, and deploy:restart try sudo as :runner. The other sudo-enabled tasks (deploy:setup, deploy:cleanup, etc.) will now use the :admin_runner user (which by default is unset). [Jamis Buck]
|
||||
|
|
|
@ -208,7 +208,9 @@ namespace :deploy do
|
|||
symlinks to the shared directory for the log, system, and tmp/pids \
|
||||
directories, and will lastly touch all assets in public/images, \
|
||||
public/stylesheets, and public/javascripts so that the times are \
|
||||
consistent (so that asset timestamping works).
|
||||
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.
|
||||
DESC
|
||||
task :finalize_update, :except => { :no_release => true } do
|
||||
run "chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
|
||||
|
@ -224,10 +226,12 @@ namespace :deploy do
|
|||
ln -s #{shared_path}/pids #{latest_release}/tmp/pids
|
||||
CMD
|
||||
|
||||
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(" ")
|
||||
run "find #{asset_paths} -exec touch -t #{stamp} {} ';'; true", :env => { "TZ" => "UTC" }
|
||||
end
|
||||
end
|
||||
|
||||
desc <<-DESC
|
||||
Updates the symlink to the most recently deployed version. Capistrano works \
|
||||
|
|
Loading…
Reference in a new issue