Skip to content

Commit 37e2a19

Browse files
author
Federico Fissore
committed
build.xml: spreading failonerror on all exec tasks, it's better to crash early
1 parent 7d0ffe9 commit 37e2a19

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

Diff for: build/build.xml

+15-16
Original file line numberDiff line numberDiff line change
@@ -395,13 +395,13 @@
395395
</target>
396396

397397
<target name="macosx-run-common">
398-
<exec executable="open" dir="macosx/work">
398+
<exec executable="open" dir="macosx/work" failonerror="true">
399399
<arg value="Arduino.app"/>
400400
</exec>
401401
</target>
402402

403403
<target name="macosx-debug-common">
404-
<exec executable="open" dir="macosx/work" spawn="false">
404+
<exec executable="open" dir="macosx/work" spawn="false" failonerror="true">
405405
<arg value="Arduino.app"/>
406406
</exec>
407407
</target>
@@ -417,17 +417,17 @@
417417
<delete dir="macosx/work/Arduino.app" />
418418

419419
<!-- Unzip unsigned app into working dir -->
420-
<exec executable="unzip" dir="macosx/work">
420+
<exec executable="unzip" dir="macosx/work" failonerror="true">
421421
<arg line="../arduino-${version}-${platform}.zip" />
422422
</exec>
423423

424424
<!-- Unlock keychain file -->
425-
<exec executable="security" dir="macosx/work">
425+
<exec executable="security" dir="macosx/work" failonerror="true">
426426
<arg line="unlock-keychain -p &quot;${macosx-sign-keychain-pass}&quot; &quot;${macosx-sign-keychain}&quot;" />
427427
</exec>
428428

429429
<!-- Sign app -->
430-
<exec executable="codesign" dir="macosx/work">
430+
<exec executable="codesign" dir="macosx/work" failonerror="true">
431431
<arg line="--keychain &quot;${macosx-sign-keychain}&quot; --force -s &quot;${macosx-sign-id}&quot; --deep -v Arduino.app/" />
432432
</exec>
433433

@@ -439,7 +439,7 @@
439439
<delete file="macosx/arduino-${version}-${platform}.zip" />
440440

441441
<!-- Create signed zip file -->
442-
<exec executable="zip" dir="macosx/work">
442+
<exec executable="zip" dir="macosx/work" failonerror="true">
443443
<arg line="-q -r ../arduino-${version}-${platform}-signed.zip ." />
444444
</exec>
445445

@@ -470,7 +470,7 @@
470470
</target>
471471

472472
<target name="macosx-dist-common">
473-
<exec executable="zip" dir="macosx/work">
473+
<exec executable="zip" dir="macosx/work" failonerror="true">
474474
<arg line="-q -r ../arduino-${version}-${platform}.zip ." />
475475
</exec>
476476

@@ -629,11 +629,11 @@
629629
</target>
630630

631631
<target name="linux32-run" depends="linux32-build" description="Run Linux (32-bit) version">
632-
<exec executable="./linux/work/arduino" spawn="false"/>
632+
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
633633
</target>
634634

635635
<target name="linux64-run" depends="linux64-build" description="Run Linux (64-bit) version">
636-
<exec executable="./linux/work/arduino" spawn="false"/>
636+
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
637637
</target>
638638

639639
<!-- Set '${dist_file}_available' property if toolchain dist_file is downloaded -->
@@ -665,7 +665,7 @@
665665
<!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder -->
666666
<target name="untar" depends="untar-unzip-checksum" unless="${archive_file}_installed">
667667
<echo>Untarring ${archive_file} into folder ${dest_folder}</echo>
668-
<exec executable="tar">
668+
<exec executable="tar" failonerror="true">
669669
<arg value="xf"/>
670670
<arg value="${archive_file}"/>
671671
<arg value="--directory=${dest_folder}"/>
@@ -675,7 +675,7 @@
675675
<target name="unzip" depends="untar-unzip-checksum" unless="${archive_file}_installed">
676676
<echo>Unzipping ${archive_file} into folder ${dest_folder}</echo>
677677
<mkdir dir="${dest_folder}" />
678-
<exec executable="unzip">
678+
<exec executable="unzip" failonerror="true">
679679
<arg value="-q" />
680680
<arg value="-n" />
681681
<arg value="-d" />
@@ -719,7 +719,7 @@
719719
-->
720720
<move file="linux/work" tofile="linux/arduino-${version}" />
721721

722-
<exec executable="tar" dir="linux">
722+
<exec executable="tar" dir="linux" failonerror="true">
723723
<arg value="--lzma"/>
724724
<arg value="-c"/>
725725
<arg value="-f"/>
@@ -873,8 +873,7 @@
873873

874874
<target name="windows-run" depends="windows-build"
875875
description="Run windows version">
876-
<exec executable="windows/work/arduino.exe"
877-
dir="windows/work" spawn="true"/>
876+
<exec executable="windows/work/arduino.exe" dir="windows/work" spawn="true" failonerror="true"/>
878877
</target>
879878

880879
<target name="windows-dist" depends="windows-build"
@@ -976,11 +975,11 @@
976975
</target>
977976

978977
<target name="macosx-fix-bundled-toolchain-missing-symlinks" if="macosx">
979-
<exec executable="mv">
978+
<exec executable="mv" failonerror="true">
980979
<arg value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1/lib/libusb.dylib"/>
981980
<arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr/lib/"/>
982981
</exec>
983-
<exec executable="mv">
982+
<exec executable="mv" failonerror="true">
984983
<arg value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1/lib/libusb-1.0.dylib"/>
985984
<arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr/lib/"/>
986985
</exec>

0 commit comments

Comments
 (0)