-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
move buildCyclonedxLib to Build the CycloneDX Java library and app used for SBoM generation from build.sh to sbom.sh #3209
Changes from all commits
77edde6
481c2f6
8d34d40
92ee3c2
df2638f
3329dc6
895a957
24a0756
83188df
40c86d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,32 @@ | ||
#!/bin/bash | ||
# Build the CycloneDX Java library and app used for SBoM generation | ||
buildCyclonedxLib() { | ||
local javaHome="${1}" | ||
|
||
# Check if JDK-17 is available, download it if it isn't | ||
if [ ! -d "${javaHome}" ]; then | ||
# Download JDK-17 | ||
apiUrlTemplate="https://api.adoptium.net/v3/binary/latest/\${JDK_BOOT_VERSION}/\${releaseType}/linux/\${downloadArch}/jdk/hotspot/normal/\${vendor}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need these 2 lines: |
||
apiURL=$(eval echo ${apiUrlTemplate}) | ||
JDK_BOOT_VERSION="17" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make all these "local" variables |
||
releaseType="ga" | ||
downloadArch="x64" | ||
vendor="adoptium" | ||
apiURL="https://api.adoptium.net/v3/binary/latest/${JDK_BOOT_VERSION}/${releaseType}/linux/${downloadArch}/jdk/hotspot/normal/${vendor}" | ||
echo "Downloading GA release of boot JDK version ${JDK_BOOT_VERSION} from ${apiURL}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are missing the actual download..
Set jdkDir variable to be "${CYCLONEDB_DIR}/jdk" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then set javaHome in setupAntEnv() |
||
fi | ||
|
||
# Make Ant aware of cygwin path | ||
if [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "msys" ]]; then | ||
ANTBUILDFILE=$(cygpath -m "${CYCLONEDB_DIR}/build.xml") | ||
else | ||
ANTBUILDFILE="${CYCLONEDB_DIR}/build.xml" | ||
fi | ||
|
||
JAVA_HOME="${javaHome}" ant -f "${ANTBUILDFILE}" clean | ||
JAVA_HOME="${javaHome}" ant -f "${ANTBUILDFILE}" build | ||
} | ||
|
||
# Create a default SBOM json file: sbomJson | ||
createSBOMFile() { | ||
local javaHome="${1}" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this boot jdk logic to
temurin-build/sbin/build.sh
Line 688 in 18f343c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree, i was about to say the logic should be in
setupAntEnv()