Create method for accessing Xcode version.
This commit is contained in:
parent
dae5a4477b
commit
f8127143cf
@ -18,8 +18,7 @@ module Homebrew extend self
|
||||
end
|
||||
|
||||
def xcode_version
|
||||
`xcodebuild -version 2>&1` =~ /Xcode (\d(\.\d)*)/
|
||||
$1
|
||||
@xcode_version || MacOS.xcode_version
|
||||
end
|
||||
|
||||
def llvm_recommendation
|
||||
|
||||
@ -271,6 +271,11 @@ module MacOS extend self
|
||||
end
|
||||
end
|
||||
|
||||
def xcode_version
|
||||
`xcodebuild -version 2>&1` =~ /Xcode (\d(\.\d)*)/
|
||||
$1
|
||||
end
|
||||
|
||||
def llvm_build_version
|
||||
unless xcode_prefix.to_s.empty?
|
||||
llvm_gcc_path = xcode_prefix/"usr/bin/llvm-gcc"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user