Skip to content

Commit

Permalink
Set API Doc Version in generate release zip script (#3267)
Browse files Browse the repository at this point in the history
* Without explicitly set the version, the tool intelligently picks the version number from the podspec file. This may be OK unless we forgot to update the version in the podspec or we cannot update the version until the release time.

* Explicitly set the version number when generating the doc. If the version is not specified, there will be no version shown in the doc.
  • Loading branch information
pasin authored Mar 28, 2024
1 parent f12c86d commit 9b6e07d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Scripts/generate_objc_release_zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,11 @@ then
fi

VERSION_SUFFIX=""
API_DOC_VERSION=""
if [ -n "$VERSION" ]
then
VERSION_SUFFIX="_$VERSION"
API_DOC_VERSION="$VERSION"
fi

# Build frameworks:
Expand Down Expand Up @@ -194,7 +196,7 @@ if [[ -z $NO_API_DOCS ]]; then
# Generate API docs:
echo "Generate API docs ..."
OBJC_UMBRELLA_HEADER=`find $OUTPUT_OBJC_XC_DIR -name "CouchbaseLite.h"`
jazzy --clean --objc --umbrella-header ${OBJC_UMBRELLA_HEADER} --module CouchbaseLite --theme Scripts/Support/Docs/Theme --readme README.md --output ${OUTPUT_DOCS_DIR}/CouchbaseLite
jazzy --clean --objc --umbrella-header ${OBJC_UMBRELLA_HEADER} --module CouchbaseLite --module-version "${API_DOC_VERSION}" --theme Scripts/Support/Docs/Theme --readme README.md --output ${OUTPUT_DOCS_DIR}/CouchbaseLite

# >> Objective-C API
pushd "$OUTPUT_OBJC_DOCS_DIR" > /dev/null
Expand Down
4 changes: 3 additions & 1 deletion Scripts/generate_swift_release_zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ then
fi

VERSION_SUFFIX=""
API_DOC_VERSION=""
if [ -n "$VERSION" ]
then
VERSION_SUFFIX="_$VERSION"
API_DOC_VERSION="$VERSION"
fi

# Build frameworks:
Expand Down Expand Up @@ -191,7 +193,7 @@ sh Scripts/generate_package_manifest.sh -zip-path "$OUTPUT_DIR/couchbase-lite-sw
if [[ -z $NO_API_DOCS ]]; then
# Generate API docs:
echo "Generate API docs ..."
jazzy --clean --xcodebuild-arguments "clean,build,-scheme,${SCHEME_PREFIX}_Swift,-sdk,iphonesimulator,-destination,generic/platform=iOS Simulator" --module CouchbaseLiteSwift --theme Scripts/Support/Docs/Theme --readme README.md --output ${OUTPUT_DOCS_DIR}/CouchbaseLiteSwift
jazzy --clean --xcodebuild-arguments "clean,build,-scheme,${SCHEME_PREFIX}_Swift,-sdk,iphonesimulator,-destination,generic/platform=iOS Simulator" --module CouchbaseLiteSwift --module-version "${API_DOC_VERSION}" --theme Scripts/Support/Docs/Theme --readme README.md --output ${OUTPUT_DOCS_DIR}/CouchbaseLiteSwift

# >> Swift API docs
pushd "$OUTPUT_SWIFT_DOCS_DIR" > /dev/null
Expand Down

0 comments on commit 9b6e07d

Please sign in to comment.