1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Make sure assets in images, javascripts, and stylesheets are touched after updating the code, to ensure the asset timestamping feature of rails works correctly

git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@5324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jamis Buck 2006-10-20 17:52:51 +00:00
parent 6f70c9e7a3
commit 33ff97c060
2 changed files with 8 additions and 0 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Make sure assets in images, javascripts, and stylesheets are touched after updating the code, to ensure the asset timestamping feature of rails works correctly [Jamis Buck]
* Added warning if password is prompted for and termios is not installed [John Labovitz]
* Added :as option to sudo, so you can specify who the command is executed as [Mark Imbriaco]

View file

@ -82,6 +82,12 @@ task :update_code, :except => { :no_release => true } do
ln -nfs #{shared_path}/pids #{release_path}/tmp/pids; true
CMD
# update the asset timestamps so they are in sync across all servers. This
# lets the asset timestamping feature of rails work correctly
stamp = Time.now.utc.strftime("%Y%m%d%H%M.%S")
asset_paths = %w(images stylesheets javascripts).map { |p| "#{release_path}/public/#{p}" }
run "find #{asset_paths.join(" ")} -exec touch -t #{stamp} {} \\;; true"
# uncache the list of releases, so that the next time it is called it will
# include the newly released path.
@releases = nil