Skip to content

Commit 5bb3025

Browse files
committed
aa
1 parent f1266f2 commit 5bb3025

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

run_latest_jar.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,12 @@
22

33
curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
44

5-
java -jar wss-unified-agent.jar "$@"
5+
java -jar wss-unified-agent.jar "$@"
6+
7+
# fail build if exit code is not 0
8+
exitCode=$?
9+
if [ $exitCode != 0 ]
10+
then
11+
exit 1
12+
fi
13+
exit $exitCode

wss-runner.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,18 @@ echo " Start Running WhiteSource Unified Agent "
3030
echo "*******************************************************************************************************************"
3131
echo ""
3232

33-
PROJECT_DIRECTORY=${PROJECT_DIRECTORY:=""}
33+
PROJECT_DIRECTORY=${PROJECT_DIRECTORY:="."}
3434
API_KEY=${API_KEY}
3535
CONFIG_FILE=${CONFIG_FILE:="wss-unified-agent.config"}
36-
36+
pwd
37+
ls
38+
ls ${PROJECT_DIRECTORY}
3739
if [[ -z "${API_KEY}" ]]; then
38-
/run_latest_jar.sh -c ../"${CONFIG_FILE}" -d ../"${PROJECT_DIRECTORY}"
40+
/wss-scan/run_latest_jar.sh -c "${CONFIG_FILE}" -d "${PROJECT_DIRECTORY}"
3941
else
40-
/run_latest_jar.sh -apiKey "${API_KEY}" -c ../"${CONFIG_FILE}" -d ../"${PROJECT_DIRECTORY}"
42+
/wss-scan/run_latest_jar.sh -apiKey "${API_KEY}" -c "${CONFIG_FILE}" -d "${PROJECT_DIRECTORY}"
4143
fi
4244
echo ""
4345
echo "*******************************************************************************************************************"
44-
echo " Finish Running WhiteSource Unified Agent "
46+
echo " Finish Running WhiteSource Unified Agent "
4547
echo "*******************************************************************************************************************"

0 commit comments

Comments
 (0)