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

This reverts commit f63c06d68a.
This commit is contained in:
Keith Williams
2024-12-04 17:17:58 +00:00
committed by GitHub
parent 7e2b5b12b4
commit 9085287fc6
4 changed files with 8 additions and 22 deletions
+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
+1
View File
@@ -182,6 +182,7 @@ git checkout HEAD~1 yarn.lock
git commit -m "Revert yarn.lock changes"
```
_NB_: You may have to bypass the pre-commit hook with by appending `--no-verify` to the git commit
If you've pushed the commit with the `yarn.lock`:
1. Correct the commit locally using the above method.
+1
View File
@@ -58,6 +58,7 @@
"lint:report": "turbo run lint:report",
"lint": "turbo run lint",
"postinstall": "husky install && turbo run post-install",
"pre-commit": "lint-staged",
"predev": "echo 'Checking env files'",
"prisma": "yarn workspace @calcom/prisma prisma",
"start": "turbo run start --scope=\"@calcom/web\"",