PageRenderTime 43ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/overlay/home/symfony/template/code/build.xml

https://github.com/hoschi/tkl-symfony
XML | 115 lines | 107 code | 8 blank | 0 comment | 0 complexity | 7a4b54994b044a8ea9b65a1cd9cf35d9 MD5 | raw file
  1. <?xml version="1.0"?>
  2. <project name="yourproject" default="build">
  3. <property file="build.properties" />
  4. <fileset id="src" dir=".">
  5. <include name="**/*.php" />
  6. <exclude name="apps/frontend/lib/myUser.class.php" />
  7. <exclude name="lib/vendor/**" />
  8. <exclude name="apps/*/config/**"/>
  9. <exclude name="apps/*/templates/**"/>
  10. <exclude name="apps/*/modules/*/templates/**"/>
  11. <exclude name="cache/**"/>
  12. <exclude name="config/**"/>
  13. <exclude name="plugins/**"/>
  14. <exclude name="web/**"/>
  15. <exclude name="data/**"/>
  16. <exclude name="**/base/**" />
  17. <exclude name="lib/vendor/**" />
  18. </fileset>
  19. <target name="init-static">
  20. <mkdir dir="../build/" />
  21. <mkdir dir="../build/logs" />
  22. <mkdir dir="../build/reports" />
  23. <mkdir dir="../build/api" />
  24. <mkdir dir="../build/coverage-unit" />
  25. <mkdir dir="cache" />
  26. <mkdir dir="log" />
  27. <chmod mode="0775" failonerror="false">
  28. <fileset dir="../build/reports" />
  29. </chmod>
  30. </target>
  31. <target name="init">
  32. <phingcall target="init-static"/>
  33. </target>
  34. <target name="init-firsttime">
  35. <mkdir dir="cache" />
  36. <mkdir dir="log" />
  37. <phingcall target="update-symfony"/>
  38. <phingcall target="init"/>
  39. </target>
  40. <target name="clean">
  41. <delete failonerror="false" dir="../build" />
  42. </target>
  43. <target name="update-symfony">
  44. <available file="./lib/vendor/symfony/" type="dir" property="symfony-installed"/>
  45. <if>
  46. <equals arg2="true" arg1="${symfony-installed}" />
  47. <then>
  48. <exec command="svn update lib/vendor/symfony" checkreturn="true" passthru="true" />
  49. </then>
  50. <else>
  51. <exec command="svn co http://svn.symfony-project.com/branches/1.4 lib/vendor/symfony"
  52. checkreturn="true" passthru="true" />
  53. </else>
  54. </if>
  55. </target>
  56. <target name="codesniffer">
  57. <property name="format-c" value="${cs-format-c}" override="false" />
  58. <property name="format-f" value="${cs-format-f}" override="false" />
  59. <property name="outfile" value="${cs-file}" override="false" />
  60. <if>
  61. <isset property="dir"/>
  62. <then>
  63. <fileset id="cs" dir="${dir}" />
  64. </then>
  65. <else>
  66. <if>
  67. <isset property="file"/>
  68. <then>
  69. <fileset id="cs" dir="." >
  70. <include name="${file}"/>
  71. </fileset>
  72. </then>
  73. <else>
  74. <fileset id="cs" refid="src" />
  75. </else>
  76. </if>
  77. </else>
  78. </if>
  79. <phpcodesniffer
  80. standard="config/yourprojectStd"
  81. allowedFileExtensions="php">
  82. <fileset refid="cs"/>
  83. <formatter type="${format-c}" usefile="false"/>
  84. <formatter type="${format-f}" outfile="${outfile}"/>
  85. </phpcodesniffer>
  86. </target>
  87. <target name="doc" depends="clean,init-static">
  88. <phpdoc
  89. title="yourproject doc"
  90. destdir="../build/api"
  91. output="HTML:frames:DOM/earthli"
  92. sourcecode="true"
  93. quiet="true"
  94. customtags="true">
  95. <fileset refid="src"/>
  96. </phpdoc>
  97. </target>
  98. <target name="test-unit-php" depends="init">
  99. <exec command="phpunit --configuration phpunit-unit.xml --coverage-html ../build/coverage-unit --coverage-clover ../build/coverage-unit/clover.xml --log-junit ../build/logs/phpunit-unit.xml test/unit/ | tee ../build/logs/test-unit-php.log" passthru="${verbose}">
  100. </exec>
  101. <xslt todir="../build/reports" style="transform.xsl" >
  102. <fileset dir="../build/logs/">
  103. <include name="phpunit-unit.xml" />
  104. </fileset>
  105. </xslt>
  106. </target>
  107. </project>