Skip to content

Commit

Permalink
Merge pull request #416 from emanuellupu/master
Browse files Browse the repository at this point in the history
IOS-1112 - Fix documentation generation on SDK Bamboo build
  • Loading branch information
SilviuOdobescu authored Nov 29, 2018
2 parents feb6947 + 42e8c16 commit 27602a1
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
20 changes: 20 additions & 0 deletions AlfrescoSDK/.jazzy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# About
objc: true
author: Alfresco
author_url: https://www.alfresco.com
github_url: https://github.com/Alfresco/activiti-ios
readme: README.md

# Generation
module: AlfrescoSDK
umbrella_header: AlfrescoSDK/AlfrescoSDK.h
framework_root: .
exclude:
- "CMIS"
- "build"
theme: apple
hide_documentation_coverage: true
min_acl: public
output: Help
clean: true
skip_undocumented: true
26 changes: 4 additions & 22 deletions AlfrescoSDK/scripts/build_appledoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

. "${ALFRESCO_SDK_SCRIPT:-$(dirname "$0")}"/common.sh

test -x "$APPLEDOC" || die "Could not find appledoc in $PATH. Use \"brew install appledoc\""
test -x "$JAZZY" || die "Could not find jazzy in $PATH. Use \"[sudo] gem install jazz\""

test -d "$ALFRESCO_SDK_BUILD" \
|| mkdir -p "$ALFRESCO_SDK_BUILD" \
Expand All @@ -36,26 +36,8 @@ else
die "ALFRESCO_SDK_DOCSET_BUILD is not a subfolder of $ALFRESCO_SDK_ROOT ($ALFRESCO_SDK_DOCSET_BUILD)"
fi

mkdir "$ALFRESCO_SDK_DOCSET_BUILD" \
|| die "Could not create directory $ALFRESCO_SDK_DOCSET_BUILD"

$APPLEDOC \
--project-name "$ALFRESCO_SDK_PRODUCT_NAME" \
--project-company "Alfresco" \
--company-id "com.alfresco" \
--output "$ALFRESCO_SDK_DOCSET_BUILD" \
--exit-threshold 2 \
--ignore ".m" \
--ignore "build" \
--ignore "AlfrescoSDKTests" \
--ignore "CMIS" \
--keep-intermediate-files \
--create-html \
--no-create-docset \
--no-install-docset \
--no-publish-docset \
. \
|| die "appledoc failed to build documentation"
jazzy || die "jazzy failed to build documentation"

mv "$ALFRESCO_SDK_DOCSET_NAME" "$ALFRESCO_SDK_BUILD" \
|| die "Could not create directory $ALFRESCO_SDK_DOCSET_BUILD"
cd "$ALFRESCO_SDK_DOCSET_BUILD"
mv docset "$ALFRESCO_SDK_DOCSET_NAME"
2 changes: 1 addition & 1 deletion AlfrescoSDK/scripts/build_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ if [[ "$GENERATE_DOCS" == "true" ]] ; then
die "ALFRESCO_SDK_DOCSET_ZIP is not a subfolder of $ALFRESCO_SDK_ROOT ($ALFRESCO_SDK_DOCSET_ZIP)"
fi

pushd $ALFRESCO_SDK_DOCSET_BUILD
pushd $ALFRESCO_SDK_BUILD
zip -r $ALFRESCO_SDK_DOCSET_ZIP $ALFRESCO_SDK_DOCSET_NAME
popd

Expand Down
5 changes: 2 additions & 3 deletions AlfrescoSDK/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [ -z "$ALFRESCO_SDK_SCRIPT" ]; then
# Xcode build tools
test -n "$XCODEBUILD" || XCODEBUILD=$(which xcodebuild)
test -n "$LIPO" || LIPO=$(which lipo)
test -n "$APPLEDOC" || APPLEDOC=$(which appledoc)
test -n "$JAZZY" || JAZZY=$(which jazzy)


# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -99,7 +99,7 @@ if [ -z "$ALFRESCO_SDK_SCRIPT" ]; then
## Documentation

# The name of the docset
ALFRESCO_SDK_DOCSET_NAME=com.alfresco.AlfrescoSDK.docset
ALFRESCO_SDK_DOCSET_NAME=Help

# The directory where the docset is built
ALFRESCO_SDK_DOCSET_BUILD=$ALFRESCO_SDK_BUILD/Help
Expand Down Expand Up @@ -152,7 +152,6 @@ if [ -z "$ALFRESCO_SDK_SCRIPT" ]; then
TARGET_BUILD_DIR="$ALFRESCO_SDK_BUILD/$BUILD_CONFIGURATION-${2}" \
BUILT_PRODUCTS_DIR="$ALFRESCO_SDK_BUILD/$BUILD_CONFIGURATION-${2}" \
SYMROOT="$ALFRESCO_SDK_BUILD" \
clean build \
|| die "XCode build failed for configuration: $BUILD_CONFIGURATION."
}

Expand Down

0 comments on commit 27602a1

Please sign in to comment.