SalesforceFoundation/CumulusCI — pull request #103 by jlantz (2014-12-15 21:46:09+00:00)
Title: Support automated documentation generation for apex code: generateApexDoc

This branch adds integration with https://github.com/SalesforceFoundation/ApexDoc to automatically generate Apex documentation from a given tag or branch of the repository and write the generated html documentation into a separate branch of the repository (default: gh-pages).

To run, you need to add the following to `cumulusci.properties` (replace USER and REPO with correct info for your repo):
cumulusci.apexdoc.repo=git@github.com:USER/REPO
cumulusci.apexdoc.linkbase=https://github.com/USER/REPO

You can optionally specify the following in `cumulusci.properties`:
cumulusci.apexdoc.content.homepage=ApexDocContent/homepage.htm
cumulusci.apexdoc.content.banner=ApexDocContent/projectheader.htm
cumulusci.apexdoc.version=1.0
cumulusci.apexdoc.scope=global;public;private;testmethod;webService
cumulusci.apexdoc.branch=gh-pages

Then, set either the `APEXDOC_TAG` or `APEXDOC_BRANCH` environment variable and run the build:
export APEXDOC_TAG=release/1.2
ant generateApexDoc

The target will create two clones of your repository. The first clone is the source for doc generation and will be switched to the tag or branch specified. The second is the target to hold the generated docs which defaults to the `gh-pages` branch so you can get free doc hosting through GitHub Pages. NOTE: GitHub Pages in a private repository are publicly available.

Next, the target downloads the apexdoc.jar file from a GitHub Release of the ApexDoc project. Next it runs the doc generation writing the output to the target clone. Finally, the working directories are cleaned up.