From 9f44d2488cb7aeb3ffa161f045794ea2d213ac6b Mon Sep 17 00:00:00 2001 From: "@s.roertgen" Date: Tue, 19 Mar 2024 14:40:01 +0100 Subject: [PATCH] Use append redirect operator #29 --- .github/workflows/main.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 754f463..9c1a5cf 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -10,15 +10,13 @@ jobs: uses: actions/checkout@v3 - name: Check for Warnings - continue-on-error: true run: | curl -s https://raw.githubusercontent.com/skohub-io/shapes/main/scripts/checkForWarning.rq >> checkForWarning.rq find . -type f -name '*.ttl' | while read file; do # Adjust the file path to remove the './' part adjusted_file_path=$(echo "$file" | sed 's|^./||') echo "Processing $adjusted_file_path with Docker..." - result="$(docker run --rm -v "$(pwd)/$adjusted_file_path:/rdf/test.ttl" skohub/jena:4.6.1 shacl validate --shapes https://raw.githubusercontent.com/skohub-io/shapes/main/skohub.shacl.ttl --data /rdf/test.ttl)" - echo $result > result.ttl + docker run --rm -v "$(pwd)/$adjusted_file_path:/rdf/test.ttl" skohub/jena:4.6.1 shacl validate --shapes https://raw.githubusercontent.com/skohub-io/shapes/main/skohub.shacl.ttl --data /rdf/test.ttl >> result.ttl validation_result="$(docker run --rm --mount type=bind,source=./checkForWarning.rq,target=/rdf/checkForViolation.rq --mount type=bind,source=./result.ttl,target=/rdf/result.ttl skohub/jena:4.6.1 arq --data /rdf/result.ttl --query /rdf/checkForViolation.rq)" echo $validation_result lines=$(echo "$validation_result" | wc -l ) @@ -39,8 +37,7 @@ jobs: # Adjust the file path to remove the './' part adjusted_file_path=$(echo "$file" | sed 's|^./||') echo "Processing $adjusted_file_path with Docker..." - result="$(docker run --rm -v "$(pwd)/$adjusted_file_path:/rdf/test.ttl" skohub/jena:4.6.1 shacl validate --shapes https://raw.githubusercontent.com/skohub-io/shapes/main/skohub.shacl.ttl --data /rdf/test.ttl)" - echo $result > result.ttl + docker run --rm -v "$(pwd)/$adjusted_file_path:/rdf/test.ttl" skohub/jena:4.6.1 shacl validate --shapes https://raw.githubusercontent.com/skohub-io/shapes/main/skohub.shacl.ttl --data /rdf/test.ttl >> result.ttl validation_result="$(docker run --rm --mount type=bind,source=./checkForViolation.rq,target=/rdf/checkForViolation.rq --mount type=bind,source=./result.ttl,target=/rdf/result.ttl skohub/jena:4.6.1 arq --data /rdf/result.ttl --query /rdf/checkForViolation.rq)" echo $validation_result lines=$(echo "$validation_result" | wc -l )