forked from e621ng/e621ng
Link current commit if running inside a git repo.
Useful when running `rails server` straight from a dev repo.
This commit is contained in:
parent
0757f201a0
commit
58ef469a76
@ -24,6 +24,8 @@ module Danbooru
|
||||
|
||||
if File.exists?("#{config.root}/REVISION")
|
||||
config.x.git_hash = File.read("#{config.root}/REVISION").strip
|
||||
elsif system("type git && git rev-parse --show-toplevel")
|
||||
config.x.git_hash = %x(git rev-parse --short HEAD).strip
|
||||
else
|
||||
config.x.git_hash = nil
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user