File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 6
6
from core .utils .file_utils import File
7
7
from core .utils .process import Process
8
8
from core .utils .run import run
9
+ from core .utils .version import Version
9
10
10
11
11
- # noinspection PyShadowingBuiltins
12
12
class Simctl (object ):
13
13
14
14
@staticmethod
@@ -31,7 +31,6 @@ def __get_simulators():
31
31
def get_max_runtime_version (version ):
32
32
# Parse runtimes
33
33
result = Simctl .run_simctl_command (command = 'list --json runtimes' )
34
- runtimes = None
35
34
try :
36
35
runtimes = json .loads (result .output )
37
36
except ValueError :
@@ -42,7 +41,7 @@ def get_max_runtime_version(version):
42
41
exact_sdk_version = None
43
42
for runtime in runtimes ['runtimes' ]:
44
43
if str (version ) in runtime ['version' ] and runtime ['name' ].startswith ('iOS' ) and runtime ['isAvailable' ]:
45
- exact_sdk_version = runtime ['version' ]
44
+ exact_sdk_version = Version . get ( runtime ['version' ])
46
45
if exact_sdk_version is None :
47
46
raise Exception ('Can not find iOS SDK {0}' .format (version ))
48
47
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ class Version(object):
8
8
def get (version ):
9
9
"""
10
10
Convert version string to float.
11
+ Will also trim version like this:
12
+ - 13.2.2 will be trimmed to 13.2
11
13
:param version: Version string.
12
14
:return: Version as float.
13
15
"""
You can’t perform that action at this time.
0 commit comments