aboutsummaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorMark Pemberton <mpemberton5@gmail.com>2011-06-04 00:38:07 -0400
committerMark Pemberton <mpemberton5@gmail.com>2011-06-04 00:38:07 -0400
commitb628e63e015bc3b2eadc712feaa6c4d05cf75bbd (patch)
treeebdcec5c8133a3b6f86d06dc3f6fb3de46609f04 /build.xml
parent84e603aa91a303a1419962ff3ff6086710a7b1a9 (diff)
parent4c8a53c5bc632302aaf8978e711eb53a03166db5 (diff)
downloadsemanticscuttle-b628e63e015bc3b2eadc712feaa6c4d05cf75bbd.tar.gz
semanticscuttle-b628e63e015bc3b2eadc712feaa6c4d05cf75bbd.tar.bz2
Merge branch 'master' into privatekey2
Conflicts: data/templates/default/bookmarks.tpl.php
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml60
1 files changed, 53 insertions, 7 deletions
diff --git a/build.xml b/build.xml
index 9773a63..d0637c7 100644
--- a/build.xml
+++ b/build.xml
@@ -41,7 +41,6 @@
Test your zip with: unzip -l SemanticScuttle-0.95.0.zip
-->
- <mkdir dir="dist" />
<echo msg="Creating distribution zip for SemanticScuttle ${version}"/>
<delete file="${distfile}" failonerror="false"/>
<zip destfile="${distfile}" prefix="${phing.project.name}-${version}/">
@@ -121,18 +120,19 @@
<replacement
path="src/SemanticScuttle/header.php"
- type="pear-config"
- from="@data_dir@" to="data_dir"
+ type="pear-config" from="@data_dir@" to="data_dir"
+ />
+ <replacement
+ path="src/SemanticScuttle/header.php"
+ type="pear-config" from="@www_dir@" to="www_dir"
/>
<replacement
path="www/www-header.php"
- type="pear-config"
- from="@data_dir@" to="data_dir"
+ type="pear-config" from="@data_dir@" to="data_dir"
/>
<replacement
path="tests/prepare.php"
- type="pear-config"
- from="@data_dir@" to="data_dir"
+ type="pear-config" from="@data_dir@" to="data_dir"
/>
<changelog version="0.97" date="2010-06-09" license="GPL">
@@ -207,6 +207,48 @@
</target>
+ <!-- you need to have the python docutils package installed, since
+ we use the rst2html tool -->
+ <target name="build-docs">
+ <foreach param="fname" absparam="abs-fname" target="build-doc-file">
+ <fileset dir=".">
+ <include name="doc/ChangeLog"/>
+ <include name="doc/**.txt"/>
+ <include name="doc/**.rst"/>
+ <include name="doc/**/*.rst"/>
+ <exclude name="doc/LICENSE.txt"/>
+ <exclude name="doc/developers/TODO.rst"/>
+ </fileset>
+ </foreach>
+ </target>
+
+
+ <target name="build-doc-file" depends="check"
+ description="Builds a single documentation file. Pass file path as $fname"
+ >
+ <echo msg="${fname}"/>
+ <php function="preg_replace" returnProperty="outfile">
+ <param value="/^(.+)(.rst|.txt)$/"/>
+ <param value="dist/\1.html"/>
+ <param value="${fname}"/>
+ </php>
+
+ <!-- only render file if the doc file is newer than the html file -->
+ <property name="isuptodate" value="false"/>
+ <uptodate property="isuptodate" srcfile="${fname}" targetfile="${outfile}" />
+ <if>
+ <not><istrue value="${isuptodate}"/></not>
+ <then>
+ <exec
+ command="rst2html --exit-status=2 ${fname} ${outfile}"
+ checkreturn="1"
+ />
+ </then>
+ </if>
+
+ </target>
+
+
<target name="release" depends="check,zip,package,deploy-sf"
description="Release the version on sourceforge"
@@ -314,6 +356,10 @@
<fail unless="sfuser" message="Sourceforge username not defined!" />
<fail unless="sfproject" message="Sourceforge project name not defined!" />
<fail unless="sffilepath" message="Sourceforge project file path not defined!" />
+
+ <mkdir dir="dist" />
+ <mkdir dir="dist/doc" />
+ <mkdir dir="dist/doc/developers" />
</target>
</project>