Skip to content

Commit 72fde51

Browse files
author
Cruz Monrreal
authored
Merge pull request #7148 from theotherjimmy/nonzero-build-release
Tool, build_release: Return nonzero when builds fail
2 parents 9ca3252 + 427d8c2 commit 72fde51

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/build_release.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
if options.platforms != "":
7979
platforms = set(options.platforms.split(","))
8080

81+
status = True
82+
8183
if options.build_tests:
8284
# Get all paths
8385
directories = options.build_tests.split(',')
@@ -182,6 +184,7 @@
182184

183185
except Exception, e:
184186
print str(e)
187+
status = False
185188

186189
# copy targets.json file as part of the release
187190
copy(join(dirname(abspath(__file__)), '..', 'targets', 'targets.json'), MBED_LIBRARIES)
@@ -194,7 +197,7 @@
194197
print "\n\nCompleted in: (%.2f)s" % (time() - start)
195198

196199
print_report_exporter = ReportExporter(ResultExporterType.PRINT, package="build")
197-
status = print_report_exporter.report(build_report)
200+
status = status and print_report_exporter.report(build_report)
198201

199202
if not status:
200203
sys.exit(1)

0 commit comments

Comments
 (0)