[java-parent-project] branch main updated: Add optional PROMPT env var for automated Javadoc builds.

Codeberg noreply at shibboleth.net
Fri Feb 13 22:04:34 UTC 2026


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository java-parent-project.

View the commit online:
https://codeberg.org/Shibboleth/java-parent-project/commit/80bf6745dc642c1b053d5f1ef660c3cf0780603e

The following commit(s) were added to refs/heads/main by this push:
     new 80bf674  Add optional PROMPT env var for automated Javadoc builds.
80bf674 is described below

commit 80bf6745dc642c1b053d5f1ef660c3cf0780603e
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Fri Feb 13 17:03:17 2026 -0500

    Add optional PROMPT env var for automated Javadoc builds.
---
 bin/build-and-deploy-javadoc.sh | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/bin/build-and-deploy-javadoc.sh b/bin/build-and-deploy-javadoc.sh
index c63a13e..99d57ff 100755
--- a/bin/build-and-deploy-javadoc.sh
+++ b/bin/build-and-deploy-javadoc.sh
@@ -1,5 +1,7 @@
 #!/usr/bin/env bash
 
+PROMPT=${PROMPT:-true}
+
 function ask_yes_or_no() {
     read -p "$1 ([y]es or [N]o): "
     case $(echo $REPLY | tr '[A-Z]' '[a-z]') in
@@ -37,7 +39,9 @@ VER=`$MAVEN -Dmaven.repo.local=$REPO help:evaluate -Dexpression=project.version
 
 echo "Project: $PROJ, Group: $GROUP, Artifact: $ARTIFACT, Version: $VER"
 
-if [ "no" == $(ask_yes_or_no "Build javadoc aggregate?") ] ; then
+if [ "$PROMPT" == "false" ] ; then
+    echo "Prompting is disabled, building javadoc aggregate"
+elif [ "no" == $(ask_yes_or_no "Build javadoc aggregate?") ] ; then
     echo "Aborting."
     exit 0
 fi
@@ -49,7 +53,9 @@ if [ ! -f target/$ARTIFACT-$VER-javadoc.jar ] ; then
 	exit -1
 fi
 
-if [ "no" == $(ask_yes_or_no "Upload javadoc aggregate to Nexus?") ] ; then
+if [ "$PROMPT" == "false" ] ; then
+    echo "Prompting is disabled, uploading javadoc aggregate"
+elif [ "no" == $(ask_yes_or_no "Upload javadoc aggregate to Nexus?") ] ; then
     echo "Aborting."
     exit 0
 fi
@@ -57,8 +63,16 @@ fi
 $MAVEN -Dmaven.repo.local=$REPO -DskipTests gpg:sign-and-deploy-file -Durl=$NEXUS -DrepositoryId=release \
 	-Dfile=target/$ARTIFACT-$VER-javadoc.jar -DgroupId=$GROUP -DartifactId=$ARTIFACT -Dversion=$VER \
 	-DgeneratePom=false -Dpackaging=jar -Dclassifier=javadoc
-
-if [ "no" == $(ask_yes_or_no "Unpack aggregate on server?") ] ; then
+UPLOAD_SUCCESS=$?
+
+if [ "$PROMPT" == "false" ] ; then
+    if [ $UPLOAD_SUCCESS != 0 ] ; then
+        echo "Prompting is disabled but upload failed, aborting."
+        exit 0
+    else
+        echo "Prompting is disabled, unpacking javadoc aggregate"
+    fi
+elif [ "no" == $(ask_yes_or_no "Unpack aggregate on server?") ] ; then
     echo "Aborting."
     exit 0
 fi

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list