Ei kuvausta

build.xml 1.0KB

12345678910111213141516171819202122232425262728293031323334
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="php-token-stream">
  3. <target name="clean" description="Cleanup build artifacts">
  4. <delete dir="${basedir}/vendor"/>
  5. <delete file="${basedir}/composer.lock"/>
  6. </target>
  7. <target name="composer" depends="clean" description="Install dependencies with Composer">
  8. <tstamp>
  9. <format property="thirty.days.ago" pattern="MM/dd/yyyy hh:mm aa" offset="-30" unit="day"/>
  10. </tstamp>
  11. <delete>
  12. <fileset dir="${basedir}">
  13. <include name="composer.phar" />
  14. <date datetime="${thirty.days.ago}" when="before"/>
  15. </fileset>
  16. </delete>
  17. <get src="https://getcomposer.org/composer.phar" dest="${basedir}/composer.phar" skipexisting="true"/>
  18. <exec executable="php">
  19. <arg value="composer.phar"/>
  20. <arg value="install"/>
  21. </exec>
  22. </target>
  23. <target name="phpunit" description="Run unit tests with PHPUnit">
  24. <exec executable="${basedir}/vendor/bin/phpunit" failonerror="true">
  25. <arg value="--configuration"/>
  26. <arg path="${basedir}/build/phpunit.xml"/>
  27. </exec>
  28. </target>
  29. </project>