You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2026/10/08 08:55:55 UTC
svn commit: r88282 - dev/jackrabbit
Author: reschke
Date: Thu Oct 8 08:55:54 2026
New Revision: 88282
Log:
update-javadoc-jackrabbit.sh
Added:
dev/jackrabbit/update-javadoc-jackrabbit.sh (contents, props changed)
Added: dev/jackrabbit/update-javadoc-jackrabbit.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dev/jackrabbit/update-javadoc-jackrabbit.sh Thu Oct 8 08:55:54 2026 (r88282)
@@ -0,0 +1,76 @@
+#!/usr/bin/env bash
+
+# Abort immediately if any command fails, or if an unset variable is referenced
+set -euo pipefail
+
+# Usage check for required parameters
+if [ "$#" -lt 2 ]; then
+ echo "Usage: $0 <branch> <version>"
+ echo "Example: $0 2.21 2.21.0"
+ exit 1
+fi
+
+branch="$1"
+version="$2"
+
+# Special case handling for branch 2.20:
+# Older Jackrabbit release branches (e.g., 2.20) output Javadoc aggregate reports under target/site/apidocs
+# rather than target/reports/apidocs as used in 2.21+.
+if [ "${branch}" = "2.20" ]; then
+ content_dir="target/site/apidocs"
+else
+ content_dir="target/reports/apidocs"
+fi
+
+echo "==> Recording current Git branch..."
+echo " Executing: git rev-parse --abbrev-ref HEAD"
+ORIGINAL_BRANCH=$(git rev-parse --abbrev-ref HEAD)
+echo " Currently on branch: ${ORIGINAL_BRANCH}"
+
+# Register cleanup trap to return to initial branch on exit (success or error)
+cleanup() {
+ echo "==> Restoring original branch '${ORIGINAL_BRANCH}'..."
+ echo " Executing: git checkout \"${ORIGINAL_BRANCH}\""
+ git checkout "${ORIGINAL_BRANCH}" >/dev/null 2>&1 || true
+ echo "==> Cleaned up successfully."
+}
+trap cleanup EXIT
+
+echo "==> Checking out Git tag/release branch 'jackrabbit-${version}'..."
+echo " Executing: git checkout \"jackrabbit-${version}\""
+git checkout "jackrabbit-${version}"
+
+echo "==> Running Maven clean build and generating aggregated Javadoc..."
+echo " Executing: mvn -Dlocale=en clean javadoc:aggregate"
+mvn -Dlocale=en clean javadoc:aggregate
+
+echo "==> Performing dry-run export of Javadoc to SVN target directory..."
+echo " Executing: mvn scm-publish:publish-scm -Dscmpublish.pubScmUrl=scm:svn:https://svn.apache.org/repos/asf/jackrabbit/site/live/api/${branch}/ -Dscmpublish.content=${content_dir} -Dscmpublish.dryRun=true"
+mvn scm-publish:publish-scm \
+ "-Dscmpublish.pubScmUrl=scm:svn:https://svn.apache.org/repos/asf/jackrabbit/site/live/api/${branch}/" \
+ "-Dscmpublish.content=${content_dir}" \
+ -Dscmpublish.dryRun=true
+
+echo "==> Navigating to SVN checkout folder..."
+echo " Executing: cd target/scmpublish-checkout"
+cd target/scmpublish-checkout
+
+echo "==> Launching SVN diff inspection (press 'q' to exit pager)..."
+echo " Executing: svn diff . | less"
+svn diff . | less
+
+echo "==> SVN diff review complete."
+read -r -p "Do you want to proceed with committing the javadoc changes? (type 'YES!'): " CONFIRMATION
+
+if [ "${CONFIRMATION}" = "YES!" ]; then
+ echo "==> 'YES!' confirmed. Executing SVN commit..."
+ echo " Executing: svn commit -m \"${branch} javadoc\""
+ svn commit -m "${branch} javadoc"
+ echo "==> SVN commit finished."
+else
+ echo "==> Confirmation omitted ('${CONFIRMATION}' entered). Skipping SVN commit."
+fi
+
+echo "==> Returning to repository root directory..."
+echo " Executing: cd ../.."
+cd ../..