chore(script): say why it failed

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
Stavros Kois
2023-12-31 17:16:24 +02:00
committed by GitHub
parent 4ccb05e1c7
commit a65bc62a56
+8
View File
@@ -240,6 +240,14 @@ jobs:
# Extract the file name and first line from each file
filename=$(basename "${file}")
echo "Found doc file: ${file}"
test_title=$(head -n 1 "${file}" | sed 's/# //')
if [-n ${test_title} ]; then
echo "Doc title should use front matter and not # for title, for example"
echo "---"
echo "title: ${test_title}"
echo "---"
exit 1
fi
title=$(cat "${file}" | grep "title: " | sed 's/title: //')
echo "The title is: ${title}"
# Create a markdown link using the file name and title