MCPcopy Create free account
hub / github.com/SolaWing/xcode-build-server / get_workspace

Function get_workspace

config/cmd.py:84–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 if workspace is None:
83
84 def get_workspace():
85 nonlocal project
86 if project is None:
87 workspaces = glob.glob("*.xcworkspace")
88 if len(workspaces) > 1:
89 _usage("there are multiple xcworkspace in pwd, please specify one")
90 if len(workspaces) == 1:
91 return workspaces[0]
92
93 projects = glob.glob("*.xcodeproj")
94 if len(projects) > 1:
95 _usage("there are multiple xcodeproj in pwd, please specify one")
96 if len(projects) == 1:
97 project = projects[0]
98 return os.path.join(project, "project.xcworkspace")
99
100 _usage("there no xcworkspace or xcodeproj in pwd, please specify one")
101 else:
102 return os.path.join(project, "project.xcworkspace")
103
104 workspace = get_workspace()
105 else:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected