mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/11674] Do not include vendor folder if there are no dependencies.
This commit is contained in:
commit
1783134217
1 changed files with 29 additions and 13 deletions
|
@ -169,26 +169,42 @@
|
||||||
command="git archive ${revision} | tar -xf - -C ../${dir}"
|
command="git archive ${revision} | tar -xf - -C ../${dir}"
|
||||||
checkreturn="true" />
|
checkreturn="true" />
|
||||||
|
|
||||||
<!--
|
<!-- Install composer dependencies, if there are any. -->
|
||||||
If composer.phar exists in this version of the tree, also export
|
|
||||||
it into ${dir}, install dependencies, then delete it again.
|
|
||||||
-->
|
|
||||||
<exec dir="."
|
<exec dir="."
|
||||||
command="git ls-tree ${revision} composer.phar"
|
command='php -r "\$j = json_decode(file_get_contents("composer.json")); echo isset(\$j->require);"'
|
||||||
checkreturn="true"
|
checkreturn="true"
|
||||||
outputProperty='composer-ls-tree-output' />
|
outputProperty='composer-has-dependencies' />
|
||||||
<if>
|
<if>
|
||||||
<not><equals arg1="${composer-ls-tree-output}" arg2="" trim="true" /></not>
|
<equals arg1="${composer-has-dependencies}" arg2="1" trim="true" />
|
||||||
<then>
|
<then>
|
||||||
|
<!-- We have non-dev composer dependencies -->
|
||||||
<exec dir="."
|
<exec dir="."
|
||||||
command="git archive ${revision} composer.phar | tar -xf - -C ${dir}"
|
command="git ls-tree ${revision} composer.phar"
|
||||||
checkreturn="true" />
|
|
||||||
<exec dir="${dir}"
|
|
||||||
command="php composer.phar install"
|
|
||||||
checkreturn="true"
|
checkreturn="true"
|
||||||
passthru="true" />
|
outputProperty='composer-ls-tree-output' />
|
||||||
<delete file="${dir}/composer.phar" />
|
<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"
|
||||||
|
checkreturn="true"
|
||||||
|
passthru="true" />
|
||||||
|
<delete file="${dir}/composer.phar" />
|
||||||
|
</else>
|
||||||
|
</if>
|
||||||
</then>
|
</then>
|
||||||
|
<else>
|
||||||
|
<!-- We do not have composer dependencies, do not ship composer files -->
|
||||||
|
<delete file="${dir}/composer.json" />
|
||||||
|
<delete file="${dir}/composer.lock" />
|
||||||
|
</else>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<delete file="${dir}/config.php" />
|
<delete file="${dir}/config.php" />
|
||||||
|
|
Loading…
Add table
Reference in a new issue