diff --git a/bin/check-examples.sh b/bin/check-examples.sh index 7adeb7a870..c2814efdb6 100755 --- a/bin/check-examples.sh +++ b/bin/check-examples.sh @@ -12,16 +12,18 @@ THIS_DIR="$(dirname "$0")" MD_DIR=docs/annexes JSON_DIR=examples/jsonld -SPDX_VERSION="3.0.1" -SCHEMA_URL="https://spdx.org/schema/${SPDX_VERSION}/spdx-json-schema.json" -RDF_URL="https://spdx.org/rdf/${SPDX_VERSION}/spdx-model.ttl" -CONTEXT_URL="https://spdx.org/rdf/${SPDX_VERSION}/spdx-context.jsonld" +SPDX_VERSION="3.1" +SPDX_VERSION_MAJOR_MINOR="$(echo "$SPDX_VERSION" | cut -d. -f1,2)" # 3.0.1 -> 3.0; 3.0 -> 3.0 +SCHEMA_URL="https://spdx.org/schema/${SPDX_VERSION_MAJOR_MINOR}/spdx-json-schema.json" +RDF_URL="https://spdx.org/rdf/${SPDX_VERSION_MAJOR_MINOR}/spdx-model.ttl" +CONTEXT_URL="https://spdx.org/rdf/${SPDX_VERSION_MAJOR_MINOR}/spdx-context.jsonld" # print validation setup echo "Checking examples in" echo "Snippets : $MD_DIR" echo "Files : $JSON_DIR" echo "SPDX version : $SPDX_VERSION" +echo "(major.minor) : $SPDX_VERSION_MAJOR_MINOR" echo "Schema : $SCHEMA_URL" echo "Schema resolved : $(curl -I "$SCHEMA_URL" 2>/dev/null | grep -i "location:" | awk '{print $2}')" echo "RDF : $RDF_URL" diff --git a/examples/jsonld/package_sbom.json b/examples/jsonld/package_sbom.json index 6f0018d3c9..be2989d435 100644 --- a/examples/jsonld/package_sbom.json +++ b/examples/jsonld/package_sbom.json @@ -1,5 +1,5 @@ { - "@context": "https://spdx.org/rdf/3.0.1/spdx-context.jsonld", + "@context": "https://spdx.org/rdf/3.1/spdx-context.jsonld", "@graph": [ { "type": "CreationInfo", @@ -7,7 +7,7 @@ "createdBy": [ "http://spdx.example.com/Agent/JoshuaWatt" ], - "specVersion": "3.0.1", + "specVersion": "3.1", "created": "2024-03-06T00:00:00Z" }, {