14 lines
388 B
Ruby
Raw Normal View History

2016-08-18 22:11:42 +03:00
HBC_VERSION = "0.60.0".freeze
module Hbc
def self.full_version
@full_version ||= begin
revision, commit = Dir.chdir(Hbc.default_tap.path) do
[`git rev-parse --short=4 --verify -q HEAD 2>/dev/null`.chomp,
`git show -s --format="%cr" HEAD 2>/dev/null`.chomp]
end
"#{HBC_VERSION} (git revision #{revision}; last commit #{commit})"
end
end
end