Skip to content

Commit a4b2e0c

Browse files
authored
Check: improve verbosity of url verifier (#260)
* Check: improve verbosity of url verifier * Fix Renesas url * Fix Renesas url * URL add Renesas full url * Fix more Renesas URLs * Fix Renesas url in IAR directory * Testing new curl command for url checks * Fix url_checker * Fix url_verifier * Revert Renesas url changes * add txt to the ignored header checker extentions
1 parent 21b1058 commit a4b2e0c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/actions/url_verifier.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ then
88
exit 2
99
fi
1010

11+
USER_AGENT="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36"
1112
SCRIPT_RET=0
1213

1314
set -o nounset # Treat unset variables as an error
@@ -27,7 +28,7 @@ function test {
2728

2829
for UNIQ_URL in ${!dict[@]} # loop urls
2930
do
30-
CURL_RES=$(curl -I ${UNIQ_URL} 2>/dev/null| head -n 1 | cut -f 2 -d ' ')
31+
CURL_RES=$(curl -si --user-agent "$(USER_AGENT)" ${UNIQ_URL} 2>/dev/null| head -n 1 | cut -f 2 -d ' ')
3132
RES=$?
3233

3334
if [ "${CURL_RES}" == '' -o "${CURL_RES}" != '200' ]
@@ -38,11 +39,14 @@ function test {
3839
then
3940
CURL_RES=$RES
4041
SCRIPT_RET=1
42+
echo ERROR: Result is: "${CURL_RES}"
4143
elif [ "${CURL_RES}" == '403' ]
4244
then
4345
SCRIPT_RET=1
46+
echo ERROR: Result is: "${CURL_RES}"
47+
else
48+
echo WARNING: Result is: "${CURL_RES}"
4449
fi
45-
echo Result is: "${CURL_RES}"
4650
echo "================================="
4751
fi
4852
done

.github/scripts/kernel_checker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
'.tex',
3131
'.png',
3232
'.bat',
33-
'.sh'
33+
'.sh',
34+
'.txt'
3435
]
3536

3637
KERNEL_IGNORED_PATTERNS = [

0 commit comments

Comments
 (0)