Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit d864801

Browse files
Merge pull request #6621 from montegoulding/xcodebeta
[[ Xcode Setup ]] Add support for setup of Xcode-beta.app
2 parents 5cc8d32 + a0d6069 commit d864801

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

tools/setup_xcode_sdks.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,11 @@ def xcode_paths(base_dir):
8080
return_list.append(entry + "/" + l1_entry)
8181
return return_list
8282

83-
def target_xcode(base_dir):
84-
return "{}/{}".format(base_dir, "Xcode.app")
83+
def target_xcode(base_dir, beta):
84+
if beta:
85+
return "{}/{}".format(base_dir, "Xcode-beta.app")
86+
else:
87+
return "{}/{}".format(base_dir, "Xcode.app")
8588

8689
class SDKInstaller(object):
8790
def __init__(self, base_dir):
@@ -98,8 +101,8 @@ def _status(self, state, message):
98101
print("not ok - " + message)
99102
self._success = False
100103

101-
def install(self, platform, versions):
102-
target = target_xcode(self._base_dir)
104+
def install(self, platform, versions, beta):
105+
target = target_xcode(self._base_dir, beta)
103106
self._install_sdks(target, platform, versions)
104107
self._set_sdk_minversion(target, platform, versions)
105108

@@ -200,9 +203,12 @@ def _install_sdk(self, xcode_app, platform, version):
200203
installer = CachingSDKInstaller(".", "./XcodeSDKs")
201204
else:
202205
installer = SDKInstaller(".")
203-
installer.install("iPhoneOS", iphoneos_versions)
204-
installer.install("iPhoneSimulator", iphonesimulator_versions)
205-
installer.install("MacOSX", macosx_versions)
206+
207+
beta = "--beta" in sys.argv
208+
209+
installer.install("iPhoneOS", iphoneos_versions, beta)
210+
installer.install("iPhoneSimulator", iphonesimulator_versions, beta)
211+
installer.install("MacOSX", macosx_versions, beta)
206212

207213
if not installer.is_successful():
208214
print("ERROR: Some SDKs couldn't be installed")

0 commit comments

Comments
 (0)