Skip to content

Commit

Permalink
Add target to zip doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Feb 9, 2017
1 parent abba1fd commit 3faa16f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Type "ant -p" for a list of targets.
<description>Build file for sphinx documentation</description>
<property name="root.dir" location="."/>

<target name="zip" depends="html">
<ant dir="omero" target="zip"/>
</target>

<target name="html">
<ant dir="omero" target="html"/>
<ant dir="contributing" target="html"/>
Expand Down
27 changes: 27 additions & 0 deletions common/rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ Type "ant -p" for a list of targets.
</macrodef>


<!-- Change the value to upper case for the zip -->
<scriptdef language="javascript" name="upper">
<attribute name="string" />
<attribute name="to" />

project.setProperty(attributes.get("to"),
attributes.get("string").toUpperCase());
</scriptdef>

<target name="sphinx-deps"/>
<target name="clean-deps"/>

Expand All @@ -66,6 +75,24 @@ Type "ant -p" for a list of targets.
warnopts="${sphinx.warnopts}"/>
</target>

<target name="zip" depends="html">
<basename property="component" file="${basedir}"/>
<upper string="${component}" to="upper"/>
<property name="output" value="${upper}.doc"/>
<delete dir="${sphinx.builddir}/${output}-${omero.release}"/>
<copy todir="${sphinx.builddir}/${output}-${omero.release}">
<!--
include (none) to prevent problems if component.resources-bin is empty
-->
<fileset dir="${sphinx.builddir}/html"/>
</copy>
<zip destfile="${sphinx.builddir}/${output}-${omero.release}.zip">
<zipfileset dir="${sphinx.builddir}/html" includes="**/*" prefix="${output}-${omero.release}"/>
</zip>
<delete dir="${sphinx.builddir}/${output}-${omero.release}"/>
</target>


<target name="linkcheck" depends="sphinx-deps, init">
<sphinx buildtype="linkcheck" srcdir="."
destdir="${sphinx.builddir}/linkcheck"
Expand Down

0 comments on commit 3faa16f

Please sign in to comment.