| 227 | | <!-- website task --> |
| 228 | | <!-- |
| 229 | | FIXME: need to build docs here and copy the HTML files generated from |
| 230 | | reST to website/docs/ |
| 231 | | --> |
| 232 | | <target name="website" |
| 233 | | depends="-fix-config" |
| 234 | | description="'builds' the website and moves files into the correct directory, taking care to ensure that file permissions are correct"> |
| 235 | | |
| 236 | | <copy todir="${release_website_dir}" overwrite="true"> |
| 237 | | <fileset dir="${website_dir}"> |
| 238 | | <exclude name="**/.svn*" /> |
| 239 | | <include name="**/*" /> |
| 240 | | </fileset> |
| 241 | | </copy> |
| 242 | | <antcall target="docs" /> |
| 243 | | <copy todir="${release_website_dir}/docs/" overwrite="true"> |
| 244 | | <fileset dir="${release_docs_dir}"> |
| 245 | | <exclude name="**/.svn*" /> |
| 246 | | <include name="*.html" /> |
| 247 | | </fileset> |
| 248 | | </copy> |
| 249 | | <chgrp group="www" type="both"> |
| 250 | | <fileset dir="${release_website_dir}" followsymlinks="false" includes="**/**" /> |
| 251 | | </chgrp> |
| 252 | | <chmod perm="g+rwx" type="dir"> |
| 253 | | <fileset dir="${release_website_dir}" followsymlinks="false" includes="**/**" /> |
| 254 | | </chmod> |
| 255 | | <chmod perm="g+rw" type="file"> |
| 256 | | <fileset dir="${release_website_dir}" followsymlinks="false" includes="**/**" /> |
| 257 | | </chmod> |
| 258 | | </target> |
| 259 | | <!-- end website task --> |
| 260 | | |
| 261 | | <!-- FIXME: need to fix this task!! --> |
| 262 | | <!-- docs task --> |
| 263 | | <target name="docs" |
| 264 | | unless="docless" |
| 265 | | depends="-fix-config" |
| 266 | | description="'builds' the docs"> |
| 267 | | <!-- first, clobber the docs directory and rebuild it --> |
| 268 | | <!-- |
| 269 | | FIXME: how best can we check for staleness here? Shouldn't Ant be |
| 270 | | doing this for us? Clobbering entire dirs seems a little |
| 271 | | heavyweight. |
| 272 | | --> |
| 273 | | <delete dir="${release_docs_dir}"/> |
| 274 | | <mkdir dir="${release_docs_dir}" /> |
| 275 | | <mkdir dir="${release_docs_dir}/requirements" /> |
| 276 | | <script language="jython" taskName="docs"> |
| 277 | | <![CDATA[ |
| 278 | | import sys |
| 279 | | # make the python standard library avialable |
| 280 | | sys.path.append(project.resolveFile("lib/pyLib.zip").getPath()) |
| 281 | | sys.path.append(project.resolveFile(".").getPath()) |
| 282 | | |
| 283 | | # import re |
| 284 | | import os |
| 285 | | from buildUtil import * |
| 286 | | |
| 287 | | buildRestFiles( dojo.getProperty("articles_dir"), |
| 288 | | dojo.getProperty("release_docs_dir"), |
| 289 | | dojo.getProperty("rest_style_sheet"), |
| 290 | | dojo.getProperty("rest_files")) |
| 291 | | ]]> |
| 292 | | </script> |
| 293 | | |
| 294 | | <!-- fix body tags --> |
| 295 | | <replaceregexp match="^<body>$" byline="true" |
| 296 | | replace="<body class="docs">" flags="g"> |
| 297 | | <fileset dir="${release_docs_dir}"> |
| 298 | | <exclude name="**/.svn*" /> |
| 299 | | <include name="**/*.html" /> |
| 300 | | </fileset> |
| 301 | | </replaceregexp> |
| 302 | | |
| 303 | | </target> |
| 304 | | <!-- end docs task --> |
| 305 | | |