mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Display 'last updated' on dashboard, improve release notes link (#7560)
This commit is contained in:
@@ -437,6 +437,16 @@ module Discourse
|
||||
end
|
||||
end
|
||||
|
||||
def self.last_commit_date
|
||||
ensure_version_file_loaded
|
||||
$last_commit_date ||=
|
||||
begin
|
||||
git_cmd = 'git log -1 --format="%ct"'
|
||||
seconds = self.try_git(git_cmd, nil)
|
||||
seconds.nil? ? nil : DateTime.strptime(seconds, '%s')
|
||||
end
|
||||
end
|
||||
|
||||
def self.try_git(git_cmd, default_value)
|
||||
version_value = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user