Skip to content

Commit

Permalink
Make sure the build fails when an <exec> task during PHAR creation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Sep 8, 2018
1 parent b812332 commit 85d78be
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@
<mkdir dir="${basedir}/build/phar"/>
<copy file="${basedir}/composer.json" tofile="${basedir}/composer.json.bak"/>

<exec executable="${basedir}/build/tools/composer">
<exec executable="${basedir}/build/tools/composer" failonerror="true">
<arg value="require"/>
<arg value="phpunit/php-invoker:~1.1"/>
</exec>

<move file="${basedir}/composer.json.bak" tofile="${basedir}/composer.json"/>

<exec executable="${basedir}/build/phar-manifest.php" output="${basedir}/build/phar/manifest.txt"/>
<exec executable="${basedir}/build/phar-manifest.php" output="${basedir}/build/phar/manifest.txt" failonerror="true"/>

<copy file="${basedir}/vendor/phpunit/php-code-coverage/LICENSE" tofile="${basedir}/build/phar/php-code-coverage/LICENSE"/>
<copy todir="${basedir}/build/phar/php-code-coverage">
Expand Down Expand Up @@ -329,12 +329,12 @@
</fileset>
</copy>

<exec executable="${basedir}/build/phar-version.php" outputproperty="_version">
<exec executable="${basedir}/build/phar-version.php" outputproperty="_version" failonerror="true">
<arg value="${version}"/>
<arg value="${type}"/>
</exec>

<exec executable="${basedir}/build/tools/phpab" taskname="phpab">
<exec executable="${basedir}/build/tools/phpab" taskname="phpab" failonerror="true">
<arg value="--all" />
<arg value="--static" />
<arg value="--once" />
Expand All @@ -351,7 +351,7 @@
<copy file="${basedir}/build/binary-phar-autoload.php.in" tofile="${basedir}/build/binary-phar-autoload.php"/>
<replace file="${basedir}/build/binary-phar-autoload.php" token="X.Y.Z" value="${_version}"/>

<exec executable="${basedir}/build/tools/phpab" taskname="phpab">
<exec executable="${basedir}/build/tools/phpab" taskname="phpab" failonerror="true">
<arg value="--all" />
<arg value="--nolower" />
<arg value="--static" />
Expand All @@ -372,7 +372,7 @@
</target>

<target name="-phar-determine-version">
<exec executable="${basedir}/build/version.php" outputproperty="version" />
<exec executable="${basedir}/build/version.php" outputproperty="version" failonerror="true" />
</target>

<target name="generate-project-documentation" depends="-phploc,-checkstyle,-phpunit">
Expand Down

0 comments on commit 85d78be

Please sign in to comment.