Skip to content
Snippets Groups Projects
Commit b4a4db4d authored by Demian Katz's avatar Demian Katz Committed by Robert Lange
Browse files

Add flag to skip phpdoc during build.

- Serves as workaround for broken documentation build caused by PHPDocumentor bugs.
parent 718e88b0
Branches
Tags
No related merge requests found
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<property name="snooze_multiplier" value="1" /><!-- can be used to slow down tests (selenium only) --> <property name="snooze_multiplier" value="1" /><!-- can be used to slow down tests (selenium only) -->
<property name="solr_startup_sleep" value="0" /> <property name="solr_startup_sleep" value="0" />
<property name="solr_version" value="7.3.1" /> <property name="solr_version" value="7.3.1" />
<property name="skip_phpdoc" value="false" />
<property name="phpdoc_version" value="2.9.0" /> <property name="phpdoc_version" value="2.9.0" />
<property name="version" value="6.0" /> <property name="version" value="6.0" />
...@@ -139,30 +140,36 @@ ...@@ -139,30 +140,36 @@
<!-- PHP API Documentation --> <!-- PHP API Documentation -->
<target name="phpdoc"> <target name="phpdoc">
<!-- GET phpDocumentor.phar --> <!-- Skip the whole phpdoc task when disabled -->
<if> <if>
<not><available file="${srcdir}/vendor/bin/phpDocumentor-${phpdoc_version}.phar" /></not> <not><istrue value="${skip_phpdoc}" /></not>
<then> <then>
<httpget followRedirects="true" url="https://github.com/phpDocumentor/phpDocumentor2/releases/download/v${phpdoc_version}/phpDocumentor.phar" dir="${srcdir}/vendor/bin" filename="phpDocumentor-${phpdoc_version}.phar" /> <!-- GET phpDocumentor.phar -->
<chmod mode="0755"> <if>
<fileset dir="${srcdir}/vendor/bin"> <not><available file="${srcdir}/vendor/bin/phpDocumentor-${phpdoc_version}.phar" /></not>
<include name="phpDocumentor-${phpdoc_version}.phar" /> <then>
<httpget followRedirects="true" url="https://github.com/phpDocumentor/phpDocumentor2/releases/download/v${phpdoc_version}/phpDocumentor.phar" dir="${srcdir}/vendor/bin" filename="phpDocumentor-${phpdoc_version}.phar" />
<chmod mode="0755">
<fileset dir="${srcdir}/vendor/bin">
<include name="phpDocumentor-${phpdoc_version}.phar" />
</fileset>
</chmod>
</then>
</if>
<!-- Run phpdoc -->
<mkdir dir="${builddir}/apidocs" />
<!-- Old embedded version; no longer works correctly...
<phpdoc2 title="VuFind API Documentation"
pharlocation="${srcdir}/vendor/bin/phpDocumentor-${phpdoc_version}.phar"
destdir="${builddir}/apidocs">
<fileset dir=".">
<include name="module/*/src/**/*.php" />
</fileset> </fileset>
</chmod> </phpdoc2>
-->
<exec command="php ${srcdir}/vendor/bin/phpDocumentor-${phpdoc_version}.phar --title=&quot;VuFind API Documentation&quot; -t ${builddir}/apidocs -d ${srcdir}/module" passthru="true" />
</then> </then>
</if> </if>
<!-- Run phpdoc -->
<mkdir dir="${builddir}/apidocs" />
<!-- Old embedded version; no longer works correctly...
<phpdoc2 title="VuFind API Documentation"
pharlocation="${srcdir}/vendor/bin/phpDocumentor-${phpdoc_version}.phar"
destdir="${builddir}/apidocs">
<fileset dir=".">
<include name="module/*/src/**/*.php" />
</fileset>
</phpdoc2>
-->
<exec command="php ${srcdir}/vendor/bin/phpDocumentor-${phpdoc_version}.phar --title=&quot;VuFind API Documentation&quot; -t ${builddir}/apidocs -d ${srcdir}/module" passthru="true" />
</target> </target>
<!-- PHPUnit --> <!-- PHPUnit -->
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment