diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 295a7d509fc..437c36e463d 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -58,5 +58,6 @@ <%= render :partial => "common/discourse_javascript" %> <%= render_google_analytics_code %> + diff --git a/lib/discourse.rb b/lib/discourse.rb index 1893fa56a03..4d0d119b761 100644 --- a/lib/discourse.rb +++ b/lib/discourse.rb @@ -44,6 +44,14 @@ module Discourse !!$redis.get( maintenance_mode_key ) end + def self.git_version + begin + $git_version ||= `git rev-parse HEAD` + rescue + $git_version = "unknown" + end + end + private