1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 15:17:16 +01:00

Merge pull request #4400 from Elsensee/ticket/14731

[ticket/14731] Skip composer when exporting old versions
This commit is contained in:
Marc Alexander 2016-08-04 20:44:33 +02:00
commit 2dae36e3fb

View File

@ -49,7 +49,7 @@
-->
<target name="composer">
<exec dir="phpBB"
command="php ../composer.phar install --dev"
command="php ../composer.phar install"
checkreturn="true"
passthru="true" />
</target>
@ -143,6 +143,7 @@
<phingcall target="export">
<property name="revision" value="release-${version}" />
<property name="dir" value="build/old_versions/release-${version}" />
<property name="skip-composer" value="true" />
</phingcall>
<phingcall target="clean-diff-dir">
@ -251,26 +252,35 @@
<equals arg1="${composer-has-dependencies}" arg2="1" trim="true" />
<then>
<!-- We have non-dev composer dependencies -->
<exec dir="."
command="git ls-tree ${revision} composer.phar"
checkreturn="true"
outputProperty='composer-ls-tree-output' />
<if>
<equals arg1="${composer-ls-tree-output}" arg2="" trim="true" />
<not><isset property="skip-composer" /></not>
<then>
<fail message="There are composer dependencies, but composer.phar is missing." />
</then>
<else>
<!-- Export the phar, install dependencies, delete phar. -->
<exec dir="."
command="git archive ${revision} composer.phar | tar -xf - -C ${dir}"
checkreturn="true" />
<exec dir="${dir}"
command="php composer.phar install --no-dev --optimize-autoloader"
command="git ls-tree ${revision} composer.phar"
checkreturn="true"
passthru="true" />
<delete file="${dir}/composer.phar" />
</else>
outputProperty='composer-ls-tree-output' />
<if>
<equals arg1="${composer-ls-tree-output}" arg2="" trim="true" />
<then>
<fail message="There are composer dependencies, but composer.phar is missing." />
</then>
<else>
<!-- Export the phar, install dependencies, delete phar. -->
<exec dir="."
command="git archive ${revision} composer.phar | tar -xf - -C ${dir}"
checkreturn="true" />
<exec dir="${dir}"
command="php composer.phar install --no-dev --optimize-autoloader"
checkreturn="true"
passthru="true" />
<delete file="${dir}/composer.phar" />
<phingcall target="clean-vendor-dir">
<property name="dir" value="${dir}" />
</phingcall>
</else>
</if>
</then>
</if>
</then>
<else>
@ -287,10 +297,6 @@
<delete dir="${dir}/develop" />
<delete dir="${dir}/install/data" />
<phingcall target="clean-vendor-dir">
<property name="dir" value="${dir}" />
</phingcall>
<echo msg="Setting permissions for checkout of ${revision} in ${dir}" />
<!-- set permissions of all files to 644, directories to 755 -->
<exec dir="${dir}" command="find . -type f|xargs chmod 644" escape="false" />
@ -307,6 +313,7 @@
<delete dir="${dir}/vendor/lusitanian/oauth/examples" />
<delete dir="${dir}/vendor/lusitanian/oauth/tests" />
<delete file="${dir}/vendor/lusitanian/oauth/.gitignore" />
<delete file="${dir}/vendor/lusitanian/oauth/.scrutinizer.yml" />
<delete file="${dir}/vendor/lusitanian/oauth/.travis.yml" />
<delete file="${dir}/vendor/lusitanian/oauth/phpunit.xml.dist" />
<delete file="${dir}/vendor/lusitanian/oauth/README.md" />
@ -381,10 +388,9 @@
<delete file="${dir}/vendor/twig/twig/.editorconfig" />
<delete file="${dir}/vendor/twig/twig/.gitignore" />
<delete file="${dir}/vendor/twig/twig/.travis.yml" />
<delete file="${dir}/vendor/twig/twig/AUTHORS" />
<delete file="${dir}/vendor/twig/twig/CHANGELOG" />
<delete file="${dir}/vendor/twig/twig/phpunit.xml.dist" />
<delete file="${dir}/vendor/twig/twig/README.markdown" />
<delete file="${dir}/vendor/twig/twig/README.rst" />
</target>
<target name="clean-diff-dir">