Skip to content

Commit f10bb18

Browse files
committed
Merge pull request #1166 from bridadan/build-release-platform-filter
Added platform filter to build_release.py
2 parents 4e503ef + 0afe1e8 commit f10bb18

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

workspace_tools/build_release.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@
119119
default=False, help="Verbose diagnostic output")
120120
parser.add_option("-t", "--toolchains", dest="toolchains", help="Use toolchains names separated by comma")
121121

122+
parser.add_option("-p", "--platforms", dest="platforms", default="", help="Build only for the platform namesseparated by comma")
123+
122124
parser.add_option("", "--report-build", dest="report_build_file_name", help="Output the build results to an html file")
123125

124126

@@ -128,7 +130,16 @@
128130
successes = []
129131
skips = []
130132
build_report = []
133+
134+
platforms = None
135+
if options.platforms != "":
136+
platforms = set(options.platforms.split(","))
137+
131138
for target_name, toolchain_list in OFFICIAL_MBED_LIBRARY_BUILD:
139+
if platforms is not None and not target_name in platforms:
140+
print("Excluding %s from release" % target_name)
141+
continue
142+
132143
if options.official_only:
133144
toolchains = (getattr(TARGET_MAP[target_name], 'default_toolchain', 'ARM'),)
134145
else:

0 commit comments

Comments
 (0)