1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-02-07 11:36:25 +02:00
imgproxy/.lefthook/pre-push/check-docs-versions
2022-07-04 15:59:34 +06:00

20 lines
333 B
Bash
Executable File

#!/bin/bash
re="^v([3-9]\.[0-9]+)\.0$"
versions=$(cat docs/assets/versions.js)
exitcode=0
while read -r tag; do
if [[ $tag =~ $re ]]; then
version=${BASH_REMATCH[1]};
if [[ $versions != *$version* ]]; then
echo "Add $version to docs versions" 1>&2;
exitcode=1
fi
fi
done < <(git tag);
exit $exitcode