Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional debug output to the prepare assembly step #48

Merged
merged 1 commit into from
Jul 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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