The project build migration in 1.2 should preserve the original time stamp
Reported by Jeremy Lightsmith | April 21st, 2008 @ 01:43 PM | in current
The project build migration in 1.2 should preserve the original time stamp so that the correct build date/time is reported. I used: diff a/db/migrate/001_move_status_from_file_to_directory_name.rb b/db/migrate/001_move_status_from_file_to_directory_name.rb --- a/db/migrate/001_move_status_from_file_to_directory_name.rb +++ b/db/migrate/001_move_status_from_file_to_directory_name.rb @@ -5,6 +5,9 @@ status_file = Dir["#{dir}/build_status.*"].first next unless status_file status_info = File.basename(status_file).sub('build_status.', '') + new_dirname = "#{dir}-#{status_info}" + time_stamp = File.mtime(dir) rm status_file - mv dir, "#{dir}-#{status_info}" + mv dir, new_dirname + File.utime(time_stamp, time_stamp, new_dirname) end
Comments and changes to this ticket
-
Alexey Verkhovsky May 28th, 2008 @ 05:27 PM
- Milestone set to current
- State changed from open to resolved
fixed. thanks
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป