Scheduling infrastructure for absolutely everyone.
chore: Move pre-commit commands to pre-push (#17996)
Keith Williamsf63c06d68ae2
diff --git a/.husky/pre-commit b/.husky/pre-commitdeleted file mode 100755index c6a7938b7c5..00000000000--- a/.husky/pre-commit+++ /dev/null@@ -1,6 +0,0 @@-#!/bin/sh-. "$(dirname "$0")/_/husky.sh"--yarn lint-staged--yarn app-store:build && git add packages/app-store/*.generated.*diff --git a/.husky/pre-push b/.husky/pre-pushnew file mode 100755index 00000000000..f9a539162e1--- /dev/null+++ b/.husky/pre-push@@ -0,0 +1,22 @@+#!/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 -qdiff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex b09839e929a..487c568dc89 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -182,7 +182,6 @@ git checkout HEAD~1 yarn.lockgit commit -m "Revert yarn.lock changes"```-_NB_: You may have to bypass the pre-commit hook with by appending `--no-verify` to the git commitIf you've pushed the commit with the `yarn.lock`:1. Correct the commit locally using the above method.diff --git a/package.json b/package.jsonindex b8ddd812f61..a67af097965 100644--- a/package.json+++ b/package.json@@ -58,7 +58,6 @@"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\"",