File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ jobs:
106106 - name : Check added or updated links
107107 working-directory : ncs/nrf
108108 run : |
109- RE=" .. _\ `(.*)\ `: (.*)"
109+ RE=' .. _`(.*)`: (.*)'
110110 LINKS=$(git diff --unified=0 "${{ github.event.pull_request.base.sha }}..HEAD" -- "doc/nrf/links.txt" | \
111111 grep "^+" || true | \
112112 grep -Ev "^(---|\+\+\+)" || true)
@@ -117,13 +117,18 @@ jobs:
117117 URL=${BASH_REMATCH[2]}
118118
119119 echo -n "Checking URL for '$NAME' ($URL)... "
120- status=$(curl --write-out "%{http_code}" --output /dev/null --silent --head "$URL" || true)
120+ if [[ "$URL" == *"files.nordicsemi.com"* ]]; then
121+ # files.nordicsemi.com server does not allow downloading only headers
122+ status=$(curl --write-out "%{http_code}" --output /dev/null --silent "$URL" || true)
123+ else
124+ status=$(curl --write-out "%{http_code}" --output /dev/null --silent --head "$URL" || true)
125+ fi
121126
122127 if [[ "$status" -ne 200 ]]; then
123128 echo "FAIL (HTTP code: ${status})"
124- exit 1
125- else
126- echo "OK"
127- fi
129+ exit 1
130+ else
131+ echo "OK"
132+ fi
128133 fi
129134 done <<< "$LINKS"
You can’t perform that action at this time.
0 commit comments