Revision 2075,
892 bytes
checked in by tekrjant, 10 years ago
(diff) |
Projects in directories with spaces in them are built properly.
|
Line | |
---|
1 | import sys |
---|
2 | import os |
---|
3 | from os.path import join, exists, abspath |
---|
4 | from shutil import * |
---|
5 | from glob import * |
---|
6 | from subprocess import * |
---|
7 | |
---|
8 | |
---|
9 | def main(): |
---|
10 | root_dir = abspath('.') |
---|
11 | |
---|
12 | projects_that_did_not_build = [] |
---|
13 | |
---|
14 | for root, dirs, files in os.walk('.'): |
---|
15 | if '.svn' in dirs: |
---|
16 | dirs.remove('.svn') |
---|
17 | if 'bin' in dirs: |
---|
18 | dirs = [d for d in dirs if d == 'bin'] |
---|
19 | if 'x86' in dirs: |
---|
20 | dirs = [d for d in dirs if d == 'x86'] |
---|
21 | if 'Windows Phone' in dirs: |
---|
22 | dirs.remove('Windows Phone') |
---|
23 | |
---|
24 | projects = glob(join(root, '*.csproj')) |
---|
25 | if projects: |
---|
26 | return_code = call('msbuild /p:Configuration=Release /t:Build \"' + projects[0] + '\"', shell=True) |
---|
27 | if return_code != 0: |
---|
28 | projects_that_did_not_build.append(projects[0]) |
---|
29 | |
---|
30 | print '' |
---|
31 | print 'Projects that did not build:' |
---|
32 | for p in projects_that_did_not_build: |
---|
33 | print p |
---|
34 | |
---|
35 | |
---|
36 | if __name__ == '__main__': |
---|
37 | sys.exit(main()) |
---|
Note: See
TracBrowser
for help on using the repository browser.