File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -155,13 +155,23 @@ scp -prP "${SSH_PORT}" $SSH_OPTS "${SSH_TARGET}:temurin-build/build-farm/workspa
155155cd workspace/target || exit 1
156156for FILE in OpenJDK* ; do
157157 echo Creating metadata for ${FILE}
158- sha256sum $FILE > $FILE .sha256.txt
159- sha256=$( cat $FILE .sha256.txt | cut -d' ' -f1)
160- if [[ " $FILE " =~ .* sbom.* \. json ]]; then
161- metadata_file=${FILE% .* } -metadata.json
158+
159+ # Skip checksum generation for SBOM files
160+ if [[ " $FILE " == * sbom.json ]]; then
161+ echo " Skipping checksum generation for SBOM: $FILE "
162+ sha256=" "
162163 else
163- metadata_file=$FILE .json
164+ sha256sum " $FILE " > " $FILE .sha256.txt"
165+ sha256=$( cut -d' ' -f1 " $FILE .sha256.txt" )
164166 fi
167+
168+ # Metadata filename: SBOM files get <name>-metadata.json (consistent with naming)
169+ if [[ " $FILE " == * sbom.json ]]; then
170+ metadata_file=" ${FILE% .* } -metadata.json"
171+ else
172+ metadata_file=" $FILE .json"
173+ fi
174+
165175 createMetadataFile " $metadata_file " " ${TARGET_ARCH} " " $SCM_REF " metadata/buildSource.txt metadata/version.txt " $sha256 "
166176done
167177# Simple test job uses filenames.txt to determine the correct filenames to pull down
You can’t perform that action at this time.
0 commit comments