extension.xml 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <project name="simpletest" default="package" basedir="..">
  2. <target name="info">
  3. <echo msg="Builds a packaged release from SimpleTest extension source" />
  4. </target>
  5. <input propertyname="ext_name" promptChar=":">Name of the extension to build</input>
  6. <target name="package">
  7. <mkdir dir="extensions/test" />
  8. <copy todir="extensions/test">
  9. <filterchain>
  10. <replaceregexp>
  11. <regexp pattern="dirname\(__FILE__\)\s\.\s'\/\.\.\/\.\.\/\.\.\/autorun.php'"
  12. replace="'simpletest/autorun.php'"
  13. ignoreCase="false"/>
  14. <regexp pattern="\/\.\.\/\.\.\/\.\.\/extensions\/"
  15. replace="/../"
  16. ignoreCase="false"/>
  17. </replaceregexp>
  18. </filterchain>
  19. <fileset dir="test/extensions/${ext_name}">
  20. <include name="**/*" />
  21. </fileset>
  22. </copy>
  23. <zip destfile="${ext_name}.zip">
  24. <fileset dir="extensions">
  25. <include name="${ext_name}.php" />
  26. </fileset>
  27. <fileset dir="extensions">
  28. <include name="${ext_name}/**/*" />
  29. </fileset>
  30. <fileset dir="extensions">
  31. <include name="test/**" />
  32. </fileset>
  33. </zip>
  34. <delete dir="extensions/test" />
  35. </target>
  36. </project>