Skip to content

Commit

Permalink
Add additional debug output to the prepare assembly step
Browse files Browse the repository at this point in the history
Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
  • Loading branch information
vzhukovs committed Jul 29, 2021
1 parent b796e99 commit 536c932
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions projector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,30 @@ prepareStaticFiles() {
tar -czf "$CURRENT_PROJECTOR_STATIC_ASSEMBLY" static
}

checkInstalledJava() {
.log 6 "Check for installed Java"
.log 6 "Read JAVA_HOME env: $JAVA_HOME"
.log 6 "Read PATH env: $PATH"
if [ -n "$(type -p java)" ]; then
.log 6 "Found 'java' executable in PATH"
java_exec=java
elif [ -n "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
.log 6 "Found 'java' executable in JAVA_HOME"
java_exec="$JAVA_HOME/bin/java"
else
.log 3 "No 'java' executable found"
exit 1
fi

if [ "$java_exec" ]; then
java_version=$("$java_exec" -version 2>&1 | awk -F '"' '/version/ {print $2}')
.log 6 "Java version: $java_version"
fi
}

prepareAssembly() {
.log 6 "Prepare assembly"
checkInstalledJava
if [ -z "$URL" ]; then
.log 7 "Ignoring --tag and --url option"
checkConfigurationFileExists
Expand Down Expand Up @@ -407,6 +430,8 @@ buildContainerImage() {
selectPackagingFromPredefinedConfig
fi

checkInstalledJava

prepareStaticFiles
downloadIdePackaging
checkProjectorSourcesExist
Expand Down

0 comments on commit 536c932

Please sign in to comment.