mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-29 05:05:37 +08:00
fix motion support to properly locate xcode version
This commit is contained in:
14
bin/motion
14
bin/motion
@@ -85,10 +85,18 @@ class SupportCommand < Command
|
|||||||
email = URI.escape(`git config --get user.email`.strip)
|
email = URI.escape(`git config --get user.email`.strip)
|
||||||
|
|
||||||
# Collect details about the environment.
|
# Collect details about the environment.
|
||||||
osx_vers = `sw_vers -productVersion`.strip
|
osx_vers = `/usr/bin/sw_vers -productVersion`.strip
|
||||||
rm_vers = Motion::Version
|
rm_vers = Motion::Version
|
||||||
xcode_vers = `xcodebuild -version`.strip.scan(/Xcode\s(.+)$/).flatten[0].to_s
|
xcode_vers = begin
|
||||||
xcode_vers = 'unknown' if xcode_vers.empty?
|
xcodebuild = `which xcodebuild`.strip
|
||||||
|
xcodebuild = '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild' if xcodebuild.empty?
|
||||||
|
vers = ''
|
||||||
|
if File.exist?(xcodebuild)
|
||||||
|
vers = `#{xcodebuild} -version`.strip.scan(/Xcode\s(.+)$/).flatten[0].to_s
|
||||||
|
end
|
||||||
|
vers = 'unknown' if vers.empty?
|
||||||
|
vers
|
||||||
|
end
|
||||||
|
|
||||||
environment = URI.escape("OSX #{osx_vers}, RubyMotion #{rm_vers}, Xcode #{xcode_vers}")
|
environment = URI.escape("OSX #{osx_vers}, RubyMotion #{rm_vers}, Xcode #{xcode_vers}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user