Pulse/.husky/pre-push
2026-03-18 16:06:30 +00:00

26 lines
1.1 KiB
Text
Executable file

# Block pushing version tags directly — releases must go through the GitHub Actions workflow
# (workflow_dispatch on create-release.yml). Pushing tags manually bypasses the release
# pipeline which builds binaries, Docker images, and validates assets.
while read local_ref local_sha remote_ref remote_sha; do
if echo "$local_ref" | grep -qE "^refs/tags/v[0-9]"; then
echo ""
echo "BLOCKED: Direct push of version tag '${local_ref#refs/tags/}' is not allowed."
echo ""
echo " Releases must be created via the GitHub Actions release workflow:"
echo " gh workflow run create-release.yml -f version=X.Y.Z -f release_notes=\"...\""
echo ""
echo " Pushing tags directly skips the build pipeline and publishes a broken release"
echo " with no binaries, no Docker images, and no checksums."
echo ""
exit 1
fi
done
# Frontend quality gates before push to prevent regressions in solo workflow.
# This includes ESLint + theme audit + TypeScript checks.
if [ -f frontend-modern/package.json ]; then
cd frontend-modern
npm run lint
npm run type-check
cd ..
fi