From a48df23252e87c74ae1f45c882735d0f5cfcbf5a Mon Sep 17 00:00:00 2001 From: Andrew Hankinson Date: Fri, 19 Dec 2014 13:16:05 -0500 Subject: [PATCH] New: Jake command for building a Docset This commit adds the `docset` command to jake, to create a Docset from a doxygen build. It adds a shell script to the "support" directory that manages the build, and includes an Info.plist file that gets copied to the Docset when built. --- Jakefile | 9 +++++++++ Tools/Documentation/Info.plist | 13 +++++++++++++ Tools/Documentation/support/docset.sh | 25 +++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 Tools/Documentation/Info.plist create mode 100755 Tools/Documentation/support/docset.sh diff --git a/Jakefile b/Jakefile index d88f8aa73..bdcc60c5e 100644 --- a/Jakefile +++ b/Jakefile @@ -111,6 +111,15 @@ task ("documentation-no-frame", function() generateDocs(true); }); +task ("docset", function() +{ + // generateDocs(true); + var documentationDir = FILE.canonical(FILE.join("Tools", "Documentation")), + docsetShell = FILE.join(documentationDir, "support", "docset.sh"); + + OS.system([docsetShell, documentationDir]); +}); + function generateDocs(/* boolean */ noFrame) { // try to find a doxygen executable in the PATH; diff --git a/Tools/Documentation/Info.plist b/Tools/Documentation/Info.plist new file mode 100644 index 000000000..633a5938a --- /dev/null +++ b/Tools/Documentation/Info.plist @@ -0,0 +1,13 @@ + + + + + CFBundleName + Cappuccino + CFBundleIdentifier + cappuccino + DocSetPlatformFamily + cappuccino + + diff --git a/Tools/Documentation/support/docset.sh b/Tools/Documentation/support/docset.sh new file mode 100755 index 000000000..9ef87bf2b --- /dev/null +++ b/Tools/Documentation/support/docset.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +source "$1"/support/processor_setup.sh + +processor_msg "Generating Docset" + +MAKEFILE="Build/Documentation/html/Makefile" +DOCSDIR="Build/Documentation/html" + +processor_msg "Massaging Makefile" +sed -i '.bak' 's/docsetutil index \$(DOCSET_NAME)/docsetutil index -skip-text \$(DOCSET_NAME)/g' $MAKEFILE + +pushd $DOCSDIR +processor_msg "Running Make" +make + +processor_msg "Finishing up" +mv "org.cappuccino-project.cappuccino.docset" "Cappuccino.docset" +cp "$1"/Info.plist "Cappuccino.docset/Contents" +popd + +processor_msg "Moving docset to Build/Documentation" +mv "$DOCSDIR"/Cappuccino.docset "Build/Documentation" + +processor_msg "Done"