diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-29 07:47:23 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-29 07:47:23 -0500 |
commit | f9354b98d88bb9c6e212a68de813f75508b7dafc (patch) | |
tree | a7524f2cb59da92d5c0f09c2bc3c9ce4b4f1e74a /build | |
parent | 453ec25e209d5753107212b232bf727c36976db2 (diff) | |
parent | 51138d3f3a323b92bf07096ef98b5101f9593674 (diff) | |
download | forums-f9354b98d88bb9c6e212a68de813f75508b7dafc.tar forums-f9354b98d88bb9c6e212a68de813f75508b7dafc.tar.gz forums-f9354b98d88bb9c6e212a68de813f75508b7dafc.tar.bz2 forums-f9354b98d88bb9c6e212a68de813f75508b7dafc.tar.xz forums-f9354b98d88bb9c6e212a68de813f75508b7dafc.zip |
Merge PR #1162 branch 'develop-olympus' into develop
# By Andreas Fischer
# Via Andreas Fischer (1) and Oleg Pudeyev (1)
* develop-olympus:
[ticket/11291] phing: Also add checkreturn="true" to composer execution.
[ticket/11291] phing: Add checkreturn="true" to all new commands.
[ticket/11291] phing: Exclude vendor folder from diffs.
[ticket/11291] phing packaging: Export composer.phar and install dependencies.
[ticket/11291] phing: Remove no longer needed create-package target.
[ticket/11291] phing: The package target does not depend on composer.
[ticket/11291] phing: Adjust directory format of composer exec.
[ticket/11291] phing: Add description for composer target.
[ticket/11291] phing: Add --dev to composer install.
[ticket/11291] phing: Correct dependencies of composer target.
[ticket/11291] phing: Make sure composer is available before calling it.
Diffstat (limited to 'build')
-rw-r--r-- | build/build.xml | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/build/build.xml b/build/build.xml index a1d329f3cb..8ce61e9374 100644 --- a/build/build.xml +++ b/build/build.xml @@ -11,8 +11,7 @@ <property name="versions" value="${oldversions}, ${newversion}" /> <!-- These are the main targets which you will probably want to use --> - <target name="package" depends="clean,prepare,composer,create-package" /> - <target name="all" depends="clean,prepare,composer,test,docs,create-package" /> + <target name="all" depends="clean,prepare,composer,test,docs,package" /> <target name="build" depends="clean,prepare,composer,test,docs" /> <target name="prepare"> @@ -43,9 +42,15 @@ <delete dir="build/save" /> </target> - <target name="composer" depends="clean,prepare"> - <exec dir="./phpBB/" - command="php ../composer.phar install" + <!-- + This target basically just runs composer in the phpBB tree to ensure + all dependencies are loaded. Additional development dependencies are + loaded because testing framework may depend on them. + --> + <target name="composer"> + <exec dir="phpBB" + command="php ../composer.phar install --dev" + checkreturn="true" passthru="true" /> </target> @@ -122,7 +127,7 @@ </target> - <target name="create-package" depends="prepare-new-version,old-version-diffs"> + <target name="package" depends="clean,prepare,prepare-new-version,old-version-diffs"> <exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" /> <exec dir="build" command="php -f build_diff.php '${prevversion}' '${newversion}' > logs/build_diff.log" escape="false" /> @@ -162,9 +167,27 @@ command="git archive ${revision} | tar -xf - -C ../${dir}" checkreturn="true" /> - <exec dir="${dir}" - command="php ../composer.phar install" - passthru="true" /> + <!-- + If composer.phar exists in this version of the tree, also export + it into ${dir}, install dependencies, then delete it again. + --> + <exec dir="." + command="git ls-tree ${revision} composer.phar" + checkreturn="true" + outputProperty='composer-ls-tree-output' /> + <if> + <not><equals arg1="${composer-ls-tree-output}" arg2="" trim="true" /></not> + <then> + <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" /> + </then> + </if> <delete file="${dir}/config.php" /> <delete dir="${dir}/develop" /> @@ -187,6 +210,7 @@ <delete dir="${dir}/files" /> <delete dir="${dir}/install" /> <delete dir="${dir}/store" /> + <delete dir="${dir}/vendor" /> </target> </project> |