Skip to content

Commit

Permalink
[frontend] Use mtime to show last deployment time
Browse files Browse the repository at this point in the history
instead of the atime (access time).
This caused to show wrong timestamps for the last deployment time.
  • Loading branch information
ChrisBr committed Jun 11, 2018
1 parent 3bf38cd commit 95b9342
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/config/initializers/git.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Git
if File.exist?(File.join(Rails.root, 'last_deploy'))
COMMIT = File.open(File.join(Rails.root, 'last_deploy'), 'r') { |f| GIT_REVISION = f.gets.try(:chomp) }
LAST_DEPLOYMENT = File.new(File.join(Rails.root, 'last_deploy')).atime
LAST_DEPLOYMENT = File.new(File.join(Rails.root, 'last_deploy')).mtime
else
COMMIT = %x(SHA1=$(git rev-parse --short HEAD 2> /dev/null); if [ $SHA1 ]; then echo $SHA1; else echo ''; fi).chomp
LAST_DEPLOYMENT = ''.freeze
Expand Down

0 comments on commit 95b9342

Please sign in to comment.