mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-13 20:28:44 +01:00
Merge remote-tracking branch 'github-bantu/ticket/11674' into prep-release-3.0.12
* github-bantu/ticket/11674: [ticket/11674] Do not include vendor folder if there are no dependencies.
This commit is contained in:
commit
9a486539c3
@ -169,26 +169,42 @@
|
||||
command="git archive ${revision} | tar -xf - -C ../${dir}"
|
||||
checkreturn="true" />
|
||||
|
||||
<!--
|
||||
If composer.phar exists in this version of the tree, also export
|
||||
it into ${dir}, install dependencies, then delete it again.
|
||||
-->
|
||||
<!-- Install composer dependencies, if there are any. -->
|
||||
<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"
|
||||
outputProperty='composer-ls-tree-output' />
|
||||
outputProperty='composer-has-dependencies' />
|
||||
<if>
|
||||
<not><equals arg1="${composer-ls-tree-output}" arg2="" trim="true" /></not>
|
||||
<equals arg1="${composer-has-dependencies}" arg2="1" trim="true" />
|
||||
<then>
|
||||
<!-- We have non-dev composer dependencies -->
|
||||
<exec dir="."
|
||||
command="git archive ${revision} composer.phar | tar -xf - -C ${dir}"
|
||||
checkreturn="true" />
|
||||
<exec dir="${dir}"
|
||||
command="php composer.phar install"
|
||||
command="git ls-tree ${revision} composer.phar"
|
||||
checkreturn="true"
|
||||
passthru="true" />
|
||||
<delete file="${dir}/composer.phar" />
|
||||
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"
|
||||
checkreturn="true"
|
||||
passthru="true" />
|
||||
<delete file="${dir}/composer.phar" />
|
||||
</else>
|
||||
</if>
|
||||
</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>
|
||||
|
||||
<delete file="${dir}/config.php" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user