-
-
Save ulrikkold/8b817561bf361381c7d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project name="TYPO3-62-Extbase-Extension" default="build" basedir="."> | |
<property environment="env"/> | |
<target name="build" depends="init, unittests, phpcs, phpmd, phpcpd, cleanup"> | |
</target> | |
<target name="init"> | |
<mkdir dir="${env.WORKSPACE}/build"/> | |
<mkdir dir="${env.WORKSPACE}/build/phpcs"/> | |
<mkdir dir="${env.WORKSPACE}/build/phpunit"/> | |
<mkdir dir="${env.WORKSPACE}/typo3_core"/> | |
</target> | |
<target name="unittests"> | |
<exec executable="git" failonerror="true"> | |
<arg line="clone --single-branch --branch master --depth 1 https://github.com/TYPO3/TYPO3.CMS.git ${env.WORKSPACE}/typo3_core" /> | |
</exec> | |
<exec executable="composer"> | |
<arg line="install --working-dir ${env.WORKSPACE}/typo3_core" /> | |
</exec> | |
<mkdir dir="${env.WORKSPACE}/typo3_core/uploads"/> | |
<mkdir dir="${env.WORKSPACE}/typo3_core/typo3temp"/> | |
<mkdir dir="${env.WORKSPACE}/typo3_core/typo3conf/ext"/> | |
<symlink link="${env.WORKSPACE}/typo3_core/typo3conf/ext/${env.JOB_NAME}" resource="${env.WORKSPACE}/${env.JOB_NAME}"/> | |
<exec executable="phpunit" dir="${env.WORKSPACE}/typo3_core"> | |
<arg line="--log-junit ${env.WORKSPACE}/build/phpunit/unittests.xml --bootstrap typo3/sysext/core/Build/UnitTestsBootstrap.php typo3conf/ext/${env.JOB_NAME}/Tests/Unit" /> | |
</exec> | |
</target> | |
<target name="phpcs"> | |
<exec executable="phpcs"> | |
<arg line="--report=checkstyle | |
--report-file=${env.WORKSPACE}/build/phpcs/checkstyle.xml | |
--standard=TYPO3CMS | |
--extensions=php,inc | |
${env.WORKSPACE}/${env.JOB_NAME}" /> | |
</exec> | |
</target> | |
<target name="phpmd"> | |
<exec executable="phpmd"> | |
<arg line=" ${env.WORKSPACE}/${env.JOB_NAME} xml codesize,unusedcode,naming,design --reportfile ${env.WORKSPACE}/build/messdetector.xml --exclude Tests/" /> | |
</exec> | |
</target> | |
<target name="phpcpd"> | |
<exec executable="phpcpd"> | |
<arg line=" --log-pmd ${env.WORKSPACE}/build/phpcpd.xml ${env.WORKSPACE}/${env.JOB_NAME}" /> | |
</exec> | |
</target> | |
<target name="cleanup"> | |
<symlink action="delete" link="${env.WORKSPACE}/typo3_core/typo3conf/ext/${env.JOB_NAME}" /> | |
<delete dir="${env.WORKSPACE}/typo3_core"/> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment