From d99871fbc5959f1c975756c27d5dddbb5ab48c75 Mon Sep 17 00:00:00 2001 From: idimov-keeper <78815270+idimov-keeper@users.noreply.github.com> Date: Fri, 15 Sep 2023 17:23:36 -0500 Subject: [PATCH] Update publish.servicenow.plugin.yml Display gradlew exit code on failure --- .github/workflows/publish.servicenow.plugin.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.servicenow.plugin.yml b/.github/workflows/publish.servicenow.plugin.yml index 22507b25..7e13b0fe 100644 --- a/.github/workflows/publish.servicenow.plugin.yml +++ b/.github/workflows/publish.servicenow.plugin.yml @@ -91,7 +91,12 @@ jobs: sed -i "s/def midserver_agent_dir =.*/def midserver_agent_dir = \'${elibpath}\'/" ${gradlecfg} cd ${buildroot} - ./gradlew jar || echo "Build Failed!"; exit 1 + gradlew_return_code=0 + ./gradlew jar || gradlew_return_code=$? + if (( gradlew_return_code != 0 )); then + echo "Grade build failed with exit status $gradlew_return_code" + exit $gradlew_return_code + fi dstjarpath=${releasedir}/${buildname}-${version}-${buildversion}.jar mv ${srcjarpath} ${dstjarpath} || echo "File Copy Failed!"; exit 1