build.xml: spreading failonerror on all exec tasks, it's better to crash early

This commit is contained in:
Federico Fissore 2015-04-10 12:32:55 +02:00
parent 7d0ffe92b2
commit 37e2a1994a
1 changed files with 15 additions and 16 deletions

View File

@ -395,13 +395,13 @@
</target> </target>
<target name="macosx-run-common"> <target name="macosx-run-common">
<exec executable="open" dir="macosx/work"> <exec executable="open" dir="macosx/work" failonerror="true">
<arg value="Arduino.app"/> <arg value="Arduino.app"/>
</exec> </exec>
</target> </target>
<target name="macosx-debug-common"> <target name="macosx-debug-common">
<exec executable="open" dir="macosx/work" spawn="false"> <exec executable="open" dir="macosx/work" spawn="false" failonerror="true">
<arg value="Arduino.app"/> <arg value="Arduino.app"/>
</exec> </exec>
</target> </target>
@ -417,17 +417,17 @@
<delete dir="macosx/work/Arduino.app" /> <delete dir="macosx/work/Arduino.app" />
<!-- Unzip unsigned app into working dir --> <!-- Unzip unsigned app into working dir -->
<exec executable="unzip" dir="macosx/work"> <exec executable="unzip" dir="macosx/work" failonerror="true">
<arg line="../arduino-${version}-${platform}.zip" /> <arg line="../arduino-${version}-${platform}.zip" />
</exec> </exec>
<!-- Unlock keychain file --> <!-- Unlock keychain file -->
<exec executable="security" dir="macosx/work"> <exec executable="security" dir="macosx/work" failonerror="true">
<arg line="unlock-keychain -p &quot;${macosx-sign-keychain-pass}&quot; &quot;${macosx-sign-keychain}&quot;" /> <arg line="unlock-keychain -p &quot;${macosx-sign-keychain-pass}&quot; &quot;${macosx-sign-keychain}&quot;" />
</exec> </exec>
<!-- Sign app --> <!-- Sign app -->
<exec executable="codesign" dir="macosx/work"> <exec executable="codesign" dir="macosx/work" failonerror="true">
<arg line="--keychain &quot;${macosx-sign-keychain}&quot; --force -s &quot;${macosx-sign-id}&quot; --deep -v Arduino.app/" /> <arg line="--keychain &quot;${macosx-sign-keychain}&quot; --force -s &quot;${macosx-sign-id}&quot; --deep -v Arduino.app/" />
</exec> </exec>
@ -439,7 +439,7 @@
<delete file="macosx/arduino-${version}-${platform}.zip" /> <delete file="macosx/arduino-${version}-${platform}.zip" />
<!-- Create signed zip file --> <!-- Create signed zip file -->
<exec executable="zip" dir="macosx/work"> <exec executable="zip" dir="macosx/work" failonerror="true">
<arg line="-q -r ../arduino-${version}-${platform}-signed.zip ." /> <arg line="-q -r ../arduino-${version}-${platform}-signed.zip ." />
</exec> </exec>
@ -470,7 +470,7 @@
</target> </target>
<target name="macosx-dist-common"> <target name="macosx-dist-common">
<exec executable="zip" dir="macosx/work"> <exec executable="zip" dir="macosx/work" failonerror="true">
<arg line="-q -r ../arduino-${version}-${platform}.zip ." /> <arg line="-q -r ../arduino-${version}-${platform}.zip ." />
</exec> </exec>
@ -629,11 +629,11 @@
</target> </target>
<target name="linux32-run" depends="linux32-build" description="Run Linux (32-bit) version"> <target name="linux32-run" depends="linux32-build" description="Run Linux (32-bit) version">
<exec executable="./linux/work/arduino" spawn="false"/> <exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target> </target>
<target name="linux64-run" depends="linux64-build" description="Run Linux (64-bit) version"> <target name="linux64-run" depends="linux64-build" description="Run Linux (64-bit) version">
<exec executable="./linux/work/arduino" spawn="false"/> <exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target> </target>
<!-- Set '${dist_file}_available' property if toolchain dist_file is downloaded --> <!-- Set '${dist_file}_available' property if toolchain dist_file is downloaded -->
@ -665,7 +665,7 @@
<!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder --> <!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder -->
<target name="untar" depends="untar-unzip-checksum" unless="${archive_file}_installed"> <target name="untar" depends="untar-unzip-checksum" unless="${archive_file}_installed">
<echo>Untarring ${archive_file} into folder ${dest_folder}</echo> <echo>Untarring ${archive_file} into folder ${dest_folder}</echo>
<exec executable="tar"> <exec executable="tar" failonerror="true">
<arg value="xf"/> <arg value="xf"/>
<arg value="${archive_file}"/> <arg value="${archive_file}"/>
<arg value="--directory=${dest_folder}"/> <arg value="--directory=${dest_folder}"/>
@ -675,7 +675,7 @@
<target name="unzip" depends="untar-unzip-checksum" unless="${archive_file}_installed"> <target name="unzip" depends="untar-unzip-checksum" unless="${archive_file}_installed">
<echo>Unzipping ${archive_file} into folder ${dest_folder}</echo> <echo>Unzipping ${archive_file} into folder ${dest_folder}</echo>
<mkdir dir="${dest_folder}" /> <mkdir dir="${dest_folder}" />
<exec executable="unzip"> <exec executable="unzip" failonerror="true">
<arg value="-q" /> <arg value="-q" />
<arg value="-n" /> <arg value="-n" />
<arg value="-d" /> <arg value="-d" />
@ -719,7 +719,7 @@
--> -->
<move file="linux/work" tofile="linux/arduino-${version}" /> <move file="linux/work" tofile="linux/arduino-${version}" />
<exec executable="tar" dir="linux"> <exec executable="tar" dir="linux" failonerror="true">
<arg value="--lzma"/> <arg value="--lzma"/>
<arg value="-c"/> <arg value="-c"/>
<arg value="-f"/> <arg value="-f"/>
@ -873,8 +873,7 @@
<target name="windows-run" depends="windows-build" <target name="windows-run" depends="windows-build"
description="Run windows version"> description="Run windows version">
<exec executable="windows/work/arduino.exe" <exec executable="windows/work/arduino.exe" dir="windows/work" spawn="true" failonerror="true"/>
dir="windows/work" spawn="true"/>
</target> </target>
<target name="windows-dist" depends="windows-build" <target name="windows-dist" depends="windows-build"
@ -976,11 +975,11 @@
</target> </target>
<target name="macosx-fix-bundled-toolchain-missing-symlinks" if="macosx"> <target name="macosx-fix-bundled-toolchain-missing-symlinks" if="macosx">
<exec executable="mv"> <exec executable="mv" failonerror="true">
<arg value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1/lib/libusb.dylib"/> <arg value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1/lib/libusb.dylib"/>
<arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr/lib/"/> <arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr/lib/"/>
</exec> </exec>
<exec executable="mv"> <exec executable="mv" failonerror="true">
<arg value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1/lib/libusb-1.0.dylib"/> <arg value="${staging_folder}/work/${staging_hardware_folder}/tmp/avrdude/avrdude-6.0.1/lib/libusb-1.0.dylib"/>
<arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr/lib/"/> <arg value="${staging_folder}/work/${staging_hardware_folder}/tools/avr/lib/"/>
</exec> </exec>