build.xml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="buffertools/package" default="build">
  3. <target name="build" depends="lint,phpunit,phpcs" />
  4. <target name="lint"
  5. description="Check the syntax of PHP files">
  6. <mkdir dir="${project.basedir}/build/cache" />
  7. <phplint cachefile="${project.basedir}/build/cache/phplint.cache">
  8. <fileset dir="${project.basedir}/src">
  9. <include name="**/*.php"/>
  10. </fileset>
  11. </phplint>
  12. </target>
  13. <target name="phpunit">
  14. <delete dir="${project.basedir}/build/docs/code-coverage" />
  15. <mkdir dir="${project.basedir}/build/docs/code-coverage" />
  16. <exec executable="${project.basedir}/vendor/bin/phpunit" passthru="true">
  17. <arg value="-c" />
  18. <arg path="${project.basedir}" />
  19. <arg value="--debug" />
  20. </exec>
  21. </target>
  22. <target name="phpcs">
  23. <exec command="${project.basedir}/vendor/bin/phpcbf ./src --standard=PSR1,PSR2 -n" passthru="true">
  24. </exec>
  25. </target>
  26. <target name="build:docs" description="Build user documentation">
  27. <exec executable="make" passthru="true" dir="${project.basedir}/docs">
  28. <arg value="html" />
  29. </exec>
  30. </target>
  31. </project>