aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-09-22 08:56:40 +0100
committerMike McQuaid2016-09-22 08:56:40 +0100
commitf0e9292acdcf2bd5604d69fc1070d6f159d0b34e (patch)
tree5f8f8546a9898cf43a029ed9edacf7ed8e823a14 /Library/Homebrew/utils.rb
parent23efbc51980b7248e56a0a832544d498318bf1dd (diff)
downloadbrew-f0e9292acdcf2bd5604d69fc1070d6f159d0b34e.tar.bz2
Use git describe to get the HOMEBREW_VERSION.
For tagged commits produces the output: - `1.0.1` For untagged commits with a dirty tree produces the output: - `1.0.1-19-g23efbc5-dirty` Performance: ``` git describe --tags --dirty 2> /dev/null 0.07s user 0.01s system 96% cpu 0.086 total ``` This means we can tag any commit without needing to manually remember to bump the revision every time.
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb9
1 files changed, 0 insertions, 9 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index e466f8a08..be629f1df 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -248,15 +248,6 @@ module Homebrew
_system(cmd, *args)
end
- def self.homebrew_version_string
- if pretty_revision = HOMEBREW_REPOSITORY.git_short_head
- last_commit = HOMEBREW_REPOSITORY.git_last_commit_date
- "#{HOMEBREW_VERSION} (git revision #{pretty_revision}; last commit #{last_commit})"
- else
- "#{HOMEBREW_VERSION} (no git repository)"
- end
- end
-
def self.core_tap_version_string
require "tap"
tap = CoreTap.instance