-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Move pre-commit commands to pre-push (#17996)
* chore: Move pre-commit commands to pre-push * Is this fast * Removed test commit * Adding logging
- Loading branch information
1 parent
3dff77f
commit f63c06d
Showing
4 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 -q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters