This commit is contained in:
Sam 2017-08-28 12:25:34 -04:00
parent 4b5724ec02
commit 552fbd3c8d

@ -311,19 +311,19 @@ module Discourse
def self.git_version def self.git_version
return $git_version if $git_version return $git_version if $git_version
git_cmd='git rev-parse HEAD' git_cmd = 'git rev-parse HEAD'
self.load_version_or_git(git_cmd, Discourse::VERSION::STRING) { $git_version } self.load_version_or_git(git_cmd, Discourse::VERSION::STRING) { $git_version }
end end
def self.git_branch def self.git_branch
return $git_branch if $git_branch return $git_branch if $git_branch
git_cmd='git rev-parse --abbrev-ref HEAD' git_cmd = 'git rev-parse --abbrev-ref HEAD'
self.load_version_or_git(git_cmd, 'unknown') { $git_branch } self.load_version_or_git(git_cmd, 'unknown') { $git_branch }
end end
def self.full_version def self.full_version
return $full_version if $full_version return $full_version if $full_version
git_cmd='git describe --dirty --match "v[0-9]*"' git_cmd = 'git describe --dirty --match "v[0-9]*"'
self.load_version_or_git(git_cmd, 'unknown') { $full_version } self.load_version_or_git(git_cmd, 'unknown') { $full_version }
end end