revert: "chore: Move pre-commit commands to pre-push (#17996)" (#18009)

This reverts commit f63c06d68a.
This commit is contained in:
Keith Williams authored and GitHub committed 2024-12-04 17:17:58 +00:00
1 parent 7e2b5b12b4
commit 9085287fc6
4 files changed
+8 -22

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn lint-staged
yarn app-store:build && git add packages/app-store/*.generated.*
-22
View File
@@ -1,22 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
set -e
echo "Info: Running lint-staged"
yarn lint-staged
echo "Info: Running app-store:build"
yarn app-store:build && git add packages/app-store/*.generated.*
git stash -q --keep-index
# Check for new file changes after running the above commands
if ! git diff --cached --quiet; then
echo "Error: The build process modified files. Please commit the changes and try again."
git stash pop -q
exit 1
fi
# Restore stashed changes if nothing went wrong.
git stash pop -q