Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ant tasks for documentation

git-svn-id: http://dev.piwik.org/svn/trunk@2575 59fd770c-687e-43c8-a1e3-f5a4ff64c105
  • Loading branch information...
commit 9763dca1dfa625c6fbf0d1ff2ca5e87f25cdf2ac 1 parent 0037570
@robocoder robocoder authored
Showing with 68 additions and 0 deletions.
  1. +66 −0 tests/build-docs.xml
  2. +2 −0  tests/build.sample.properties
View
66 tests/build-docs.xml
@@ -0,0 +1,66 @@
+<project name="piwik" default="all" basedir=".">
+
+ <property file="${workspace.home}/tests/build.properties" />
+ <property file="${workspace.home}/tests/defaults.properties" />
+
+ <target name="phpdoc">
+ <echo>phpDocumentor started</echo>
+
+ <delete dir="${basedir}/documentation"/>
+ <mkdir dir="${basedir}/documentation"/>
+
+ <copy file="${workspace.home}/misc/phpdoc-config.ini" tofile="${basedir}/phpdoc-config.ini">
+ <filterset>
+ <filter token="target = documentation" value="target = ${basedir}/documentation"/>
+ </filterset>
+ </copy>
+
+ <exec executable="${php.executable}" dir="${workspace.home}/" failonerror="false" resultproperty="result-phpdoc" failifexecutionfails="true">
+ <arg value="${phpdocumentor.home}/phpDocumentor/phpdoc.inc" />
+ <arg value="--useconfig"/>
+ <arg file="${basedir}/phpdoc-config.ini"/>
+ </exec>
+
+ <echo>phpDocumentor finished</echo>
+ </target>
+
+ <target name="schemaspy">
+ <echo>SchemaSpy started</echo>
+
+ <delete dir="${basedir}/schemaspy-report"/>
+ <mkdir dir="${basedir}/schemaspy-report"/>
+
+ <java jar="${workspace.home}/lib/java/schemaSpy_3.1.1.jar" fork="true" failonerror="false" resultproperty="result-schemaspy" maxmemory="256m" dir="${workspace.home}">
+ <arg value="-t"/>
+ <arg value="mysql"/>
+ <arg value="-host"/>
+ <arg value="${database.main.host}:${database.main.port}"/>
+ <arg value="-db"/>
+ <arg value="${database.main.name}"/>
+ <arg value="-cp"/>
+ <arg path="${workspace.home}/tests/lib/java/mysql-connector-java-5.1.7.jar"/>
+ <arg value="-u"/>
+ <arg value="${database.main.username}"/>
+ <arg value="-o"/>
+ <arg path="${basedir}/schemaspy-report"/>
+ <arg value="-p"/>
+ <arg value="${database.main.password}"/>
+ </java>
+
+ <echo>SchemaSpy finished</echo>
+ </target>
+
+ <target name="all">
+ <antcall target="phpdoc"/>
+ <antcall target="schemaspy"/>
+ <fail>
+ <condition>
+ <or>
+ <equals arg1="${result-phpdoc}" arg2="1"/>
+ <equals arg1="${result-schemaspy}" arg2="1"/>
+ </or>
+ </condition>
+ </fail>
+ </target>
+
+</project>
View
2  tests/build.sample.properties
@@ -16,6 +16,8 @@ database.test.username=username
database.test.password=password
database.test.name=dbname_test
+workspace.home=/usr/share/jetty/webapps/root/hudson.dir/jobs/Piwik/master/workspace
+
phpdocumentor.home=/usr/local/PhpDocumentor
phpdocumentor.report.dir=./phpdocumentor-report
Please sign in to comment.
Something went wrong with that request. Please try again.