better mechanism for determining release revision
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<footer id="page-footer">
|
||||
Running Danbooru <%= link_to "v#{Danbooru.config.version}", "https://github.com/r888888888/danbooru/releases" %>
|
||||
(<%= Rails.application.config.x.git_hash %>)
|
||||
<% if Rails.application.config.x.git_hash %>
|
||||
(<%= Rails.application.config.x.git_hash %>)
|
||||
<% end %>
|
||||
– <%= link_to "Rules", terms_of_service_path %>
|
||||
– <%= link_to "Contact", contact_path %>
|
||||
<% if CurrentUser.user.enable_post_navigation %>
|
||||
|
||||
@@ -22,7 +22,11 @@ module Danbooru
|
||||
config.log_tags = [lambda {|req| "PID:#{Process.pid}"}]
|
||||
config.active_record.raise_in_transactional_callbacks = true
|
||||
|
||||
config.x.git_hash = `git rev-parse --short HEAD`.strip
|
||||
if File.exists?("#{config.root}/REVISION")
|
||||
config.x.git_hash = File.read("#{config.root}/REVISION").strip
|
||||
else
|
||||
config.x.git_hash = nil
|
||||
end
|
||||
end
|
||||
|
||||
I18n.enforce_available_locales = false
|
||||
|
||||
Reference in New Issue
Block a user