File tree 3 files changed +6
-11
lines changed
3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 14
14
require "global"
15
15
16
16
if ARGV == %w[ --version ] || ARGV == %w[ -v ]
17
- puts "Homebrew #{ Homebrew . homebrew_version_string } "
17
+ puts "Homebrew #{ HOMEBREW_VERSION } "
18
18
puts "Homebrew/homebrew-core #{ Homebrew . core_tap_version_string } "
19
19
exit 0
20
20
end
Original file line number Diff line number Diff line change 1
- HOMEBREW_VERSION=" 1.0.0"
1
+ HOMEBREW_VERSION=" $( git describe --tags --dirty 2> /dev/null) "
2
+ if [[ -z " $HOMEBREW_VERSION " ]]
3
+ then
4
+ HOMEBREW_VERSION=" >1.0.0 (no git repository)"
5
+ fi
2
6
3
7
onoe () {
4
8
if [[ -t 2 ]] # check whether stderr is a tty.
Original file line number Diff line number Diff line change @@ -248,15 +248,6 @@ def self.system(cmd, *args)
248
248
_system ( cmd , *args )
249
249
end
250
250
251
- def self . homebrew_version_string
252
- if pretty_revision = HOMEBREW_REPOSITORY . git_short_head
253
- last_commit = HOMEBREW_REPOSITORY . git_last_commit_date
254
- "#{ HOMEBREW_VERSION } (git revision #{ pretty_revision } ; last commit #{ last_commit } )"
255
- else
256
- "#{ HOMEBREW_VERSION } (no git repository)"
257
- end
258
- end
259
-
260
251
def self . core_tap_version_string
261
252
require "tap"
262
253
tap = CoreTap . instance
You can’t perform that action at this time.
0 commit comments