diff options
| author | Mike McQuaid | 2016-09-22 08:56:40 +0100 | 
|---|---|---|
| committer | Mike McQuaid | 2016-09-22 08:56:40 +0100 | 
| commit | f0e9292acdcf2bd5604d69fc1070d6f159d0b34e (patch) | |
| tree | 5f8f8546a9898cf43a029ed9edacf7ed8e823a14 /Library/Homebrew/brew.rb | |
| parent | 23efbc51980b7248e56a0a832544d498318bf1dd (diff) | |
| download | brew-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/brew.rb')
| -rw-r--r-- | Library/Homebrew/brew.rb | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb index eeadc70e1..0d1bcbdda 100644 --- a/Library/Homebrew/brew.rb +++ b/Library/Homebrew/brew.rb @@ -14,7 +14,7 @@ $:.unshift(HOMEBREW_LIBRARY_PATH.to_s)  require "global"  if ARGV == %w[--version] || ARGV == %w[-v] -  puts "Homebrew #{Homebrew.homebrew_version_string}" +  puts "Homebrew #{HOMEBREW_VERSION}"    puts "Homebrew/homebrew-core #{Homebrew.core_tap_version_string}"    exit 0  end  | 
