Произвожу парсинг sln файла, получая относительные пути проектов
This commit is contained in:
parent
199f24f3c5
commit
8b32c5cb88
|
|
@ -1,4 +1,5 @@
|
|||
from subprocess import call
|
||||
import re
|
||||
import settings
|
||||
|
||||
# print("all projects:")
|
||||
|
|
@ -15,11 +16,21 @@ import settings
|
|||
# print("projects to build:")
|
||||
# print(projects_to_build)
|
||||
|
||||
sln_config = "Debug|iPhone Simulator 6.0"
|
||||
# sln_config = "Debug|iPhone Simulator 6.0"
|
||||
# build_cmd_pattern = '{0} -v build "--configuration:{1}" "--target:Build" {2}'
|
||||
# build_cmd_text = build_cmd_pattern.format(settings.mdtool, sln_config, settings.sln_path)
|
||||
|
||||
build_cmd_pattern = '{0} -v build "--configuration:{1}" "--target:Build" {2}'
|
||||
build_cmd_text = build_cmd_pattern.format(settings.mdtool, sln_config, settings.sln_path)
|
||||
print(build_cmd_text)
|
||||
ret_code = call(build_cmd_text, shell=True)
|
||||
print('finished with return code: {0}'.format(ret_code))
|
||||
# print(build_cmd_text)
|
||||
# ret_code = call(build_cmd_text, shell=True)
|
||||
# print('finished with return code: {0}'.format(ret_code))
|
||||
|
||||
sln_file = open(settings.sln_path)
|
||||
sln_file_content = sln_file.read()
|
||||
# print(sln_file_content)
|
||||
|
||||
project_description_re = re.compile(r' = "(?P<project_name>\S+)", "(?P<project_rel_path>[\S\\]+csproj)"')
|
||||
match_iter = project_description_re.finditer(sln_file_content)
|
||||
|
||||
project_descriptions = [m.groupdict() for m in match_iter]
|
||||
for project_description in project_descriptions:
|
||||
print project_description['project_rel_path']
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
mdtool = "/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool"
|
||||
sln_path = "/Users/rzaitov/Documents/Apps/BuildScript/BuildSample/BuildSample/CoolApp.csproj"
|
||||
all_projects = ["MacWarehouse", "Counts", "Sales"]
|
||||
sln_path = "/Users/rzaitov/Documents/Apps/BuildScript/BuildSample/BuildSample.sln"
|
||||
|
||||
projects_to_exclude = ["Counts"]
|
||||
projects_to_exclude = ["NotCompileApp"]
|
||||
Loading…
Reference in New Issue