Xcode: update version detection for 2.x

This commit is contained in:
Misty De Meo 2014-04-17 08:23:02 -07:00 committed by Misty De Meo
parent a1a81daffc
commit 19fba42c69

View File

@ -85,6 +85,13 @@ module OS
if File.file? path if File.file? path
Utils.popen_read(path, "-version") =~ /Xcode (\d(\.\d)*)/ Utils.popen_read(path, "-version") =~ /Xcode (\d(\.\d)*)/
return $1 if $1 return $1 if $1
# Xcode 2.x's xcodebuild has a different version string
Utils.popen_read(path, "-version") =~ /DevToolsCore-(\d+\.\d)/
case $1
when "515.0" then return "2.0"
when "798.0" then return "2.5"
end
end end
end end