diff --git a/README.md b/README.md index 6003867d..1fc60ed7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ PostgreSQL 15-18 (+19 beta) License: MIT -Version 1.0-alpha3 +Version 1.0-alpha4 Status: pre-release

Read the documentation at commandprompt.github.io/pgcolumnar

diff --git a/badges/version.svg b/badges/version.svg index eee15c89..c2655b4e 100644 --- a/badges/version.svg +++ b/badges/version.svg @@ -1 +1 @@ -version: 1.0-alpha3version1.0-alpha3 \ No newline at end of file +version: 1.0-alpha4version1.0-alpha4 \ No newline at end of file diff --git a/test/docs_style.sh b/test/docs_style.sh index 4902a2fe..56dc1919 100755 --- a/test/docs_style.sh +++ b/test/docs_style.sh @@ -236,6 +236,34 @@ done check "every document citing VERSION quotes the version VERSION holds" \ "$(printf '%s' "$_stale" | sed 's/^ //')" "" +# ---- and the VERSION BADGE, which is a third place the version is written ---- +# +# `badges/version.svg` renders the version as an image, and README.md repeats it +# in that image's alt text. Neither is prose, so neither the VERSION check above +# nor the published-release check below can see them, and the badge sat at +# `1.0-alpha3` for the whole alpha4 cycle. It is the first thing on the GitHub +# page, so it is the version most readers see and the last one anything checked. +# +# THE SVG CARRIES THE STRING THREE TIMES -- aria-label, title, and the rendered +# text node -- and a fix that updates one of them looks right in a browser while +# leaving the accessible name stale. All three are compared. +_badge="$SRCDIR/badges/version.svg" +check "premise: the version badge is present" \ + "$([ -f "$_badge" ] && echo yes || echo no)" "yes" + +_badgehits="$(grep -c -- "$_ver" "$_badge" 2>/dev/null || echo 0)" +_badgeold="$(grep -oE '1\.0-[a-z]+[0-9]*' "$_badge" 2>/dev/null | sort -u | grep -vxF "$_ver" | tr '\n' ' ' | sed 's/ $//')" +check "the version badge names no version other than VERSION's" \ + "$_badgeold" "" +check "premise: and it names VERSION's version at all" \ + "$([ "${_badgehits:-0}" -ge 1 ] && echo yes || echo no)" "yes" + +# README's alt text is the badge's accessible name and drifts separately from the +# image it describes. +check "README's badge alt text names the version VERSION holds" \ + "$(grep -oE 'alt="Version [^"]*"' "$SRCDIR/README.md" | sed 's/.*alt="Version //; s/"$//')" \ + "$_ver" + # ---- the OTHER version claim, which the check above cannot see -------------- # # A second version sentence sits beside the first: "the latest published