This commit is contained in:
Théo LAGACHE
2026-01-06 16:12:04 +01:00
parent e1d1a3fb9a
commit 40a6e9e69f
6 changed files with 72 additions and 2 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
while read local_ref local_sha remote_ref remote_sha
do
if echo "$local_ref" | grep -q 'refs/tags/'; then
TAG_NAME=$(echo "$local_ref" | sed 's|refs/tags/||')
VERSION_NUM=$(echo "$TAG_NAME" | sed 's/^v//')
echo "Verifying tag $TAG_NAME against project files..."
node .github/scripts/versions.js "$VERSION_NUM"
if [ $? -ne 0 ]; then
echo "Push aborted due to version mismatch."
exit 1
fi
fi
done
exit 0