Files
portabase/.husky/pre-push
T
2026-01-06 16:12:04 +01:00

21 lines
493 B
Bash
Executable File

#!/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