pre-commit-config: update hugo check [skip ci]

This commit is contained in:
surtur 2023-07-29 17:04:47 +02:00
parent 5d11a7fa46
commit 57f0b3645c
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

@ -14,10 +14,10 @@ repos:
entry: | entry: |
bash -c " bash -c "
files='.drone.yml Dockerfile' files='.drone.yml Dockerfile'
count=$(grep -oE '( |hugo-v)[0-9].[0-9].[0-9].[0-9]' $files | cut -d':' -f2 | sed -e 's/^ *//g' -e 's/hugo-v//g' | uniq | wc -l) count=$(grep -oE '(hugo-v)[0-9].[0-9].[0-9].[0-9]' $files | cut -d':' -f2 | sed -e 's/^ *//g' -e 's/hugo-v//g' | uniq | wc -l)
if [ $count -gt 1 ]; then if [ $count -gt 1 ]; then
echo hugo versions inconsistent: echo hugo versions inconsistent:
grep -noE --color=always '( |hugo-v)[0-9].[0-9].[0-9].[0-9]' $files grep -noE --color=always '(hugo-v)[0-9].[0-9].[0-9].[0-9]' $files
exit 1 exit 1
fi fi
" "