Skip to content

Commit

Permalink
scripts/deploy.sh: add test for links to stable builds in README
Browse files Browse the repository at this point in the history
  • Loading branch information
ia committed Dec 2, 2024
1 parent e41b3f8 commit 712c8f9
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ docs_history()
return "${ret}"
}

# Check for links to release builds in README.md
docs_links()
{
ver_git="$(git tag -l | sort | grep -e "^v" | grep -v "rc" | tail -1)"
md="README.md"
ver_md="$(grep -c "${ver_git}" "${md}")"
ret=0
if [ "${ver_md}" -ne 0 ]; then
ret=1
echo "Please, update mention & links in ${md} inside Builds section for release builds with version ${ver_git}."
fi;
return "${ret}"
}

# source/Makefile:ALL_LANGUAGES & Translations/*.json automagical routine
build_langs()
{
Expand Down Expand Up @@ -191,7 +205,9 @@ if [ "docs" = "${cmd}" ]; then
hist="${?}"
build_langs
langs="${?}"
if [ "${readme}" -eq 0 ] && [ "${hist}" -eq 0 ] && [ "${langs}" -eq 0 ]; then
docs_links
links="${?}"
if [ "${readme}" -eq 0 ] && [ "${hist}" -eq 0 ] && [ "${langs}" -eq 0 ] && [ "${links}" -eq 0 ]; then
ret=0
else
ret=1
Expand All @@ -218,6 +234,11 @@ if [ "build_langs" = "${cmd}" ]; then
exit "${?}"
fi;

if [ "docs_links" = "${cmd}" ]; then
docs_links
exit "${?}"
fi;

if [ "check_style_file" = "${cmd}" ]; then
check_style_file "${2}"
exit "${?}"
Expand Down

0 comments on commit 712c8f9

Please sign in to comment.