You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by jk...@apache.org on 2025/08/08 21:03:01 UTC
(xalan-test) branch master updated: Xalanj 2821 (#12)
This is an automated email from the ASF dual-hosted git repository.
jkesselm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/xalan-test.git
The following commit(s) were added to refs/heads/master by this push:
new 5120be9b Xalanj 2821 (#12)
5120be9b is described below
commit 5120be9b3704a724ff0205b750d3cb409b62869b
Author: Joe Kesselman <13...@users.noreply.github.com>
AuthorDate: Fri Aug 8 17:02:57 2025 -0400
Xalanj 2821 (#12)
Clean up the builds to return error codes/result codes, for use when
build is invoked programmatically rather than from command line. Should
be much cleaner than trying to parse the console output.
Co-authored-by: kubycsolutions <ke...@kubyc.solutions>
---
build.bat | 10 ++++++----
build.sh | 4 +++-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/build.bat b/build.bat
index 30f82940..a2db77c5 100644
--- a/build.bat
+++ b/build.bat
@@ -28,6 +28,9 @@ rem 1) You must set JAVA_HOME
rem
rem 2) You can set ANT_HOME if you use your own Ant install
+rem Upon exit, revert any environment variable changes
+setlocal
+
echo.
echo Xalan-J test automation build
echo -----------------------------
@@ -64,14 +67,13 @@ set XERCES_ENDORSED_DIR_PATH=..\xalan-java\lib\endorsed;..\lib\endorsed
@echo on
"%_JAVACMD%" -mx1024m -Djava.endorsed.dirs=%XALAN_BUILD_DIR_PATH%;%XERCES_ENDORSED_DIR_PATH% -classpath "%_CLASSPATH%" org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
@echo off
+set _RC=%ERRORLEVEL%
goto end
:noJavaHome
echo Warning: JAVA_HOME environment variable is not set
+set _RC=-1
:end
-set _CLASSPATH=
-set _ANT_HOME=
-set _JAVACMD=
-set _ANT_JARS=
\ No newline at end of file
+exit /b %_RC%
diff --git a/build.sh b/build.sh
index 8f6c3a40..bf7bcb8f 100755
--- a/build.sh
+++ b/build.sh
@@ -92,4 +92,6 @@ XERCES_ENDORSED_DIR_PATH=../xalan-java/lib/endorsed:../lib/endorsed
echo Running: "$JAVACMD" -mx1024m -Djava.endorsed.dirs="$XALAN_BUILD_DIR_PATH:$XERCES_ENDORSED_DIR_PATH" -classpath "$CLASSPATH" org.apache.tools.ant.Main "$@"
"$JAVACMD" -mx1024m -Djava.endorsed.dirs="$XALAN_BUILD_DIR_PATH:$XERCES_ENDORSED_DIR_PATH" -classpath "$CLASSPATH" org.apache.tools.ant.Main "$@"
-echo "build.sh complete!"
+ant_rc=$?
+echo "build.sh complete with return code" $ant_rc
+exit $ant_rc
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xalan.apache.org
For additional commands, e-mail: commits-help@xalan.apache.org