-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
precommit hook preventing appconfig commit
- Loading branch information
Sun Hyuk Ahn
committed
Nov 11, 2023
1 parent
2b6824d
commit e97d7bd
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,13 @@ | ||
{ | ||
"name": "x", | ||
"version": "1.0.0", | ||
"private": true, | ||
"devDependencies": { | ||
"husky": "^8.0.3" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "sh scripts/check-appconfig.sh" | ||
} | ||
} | ||
} |
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,5 @@ | ||
#!/bin/sh | ||
if git diff --cached --name-only | grep --quiet "AppConfig.plist"; then | ||
echo "Error: Commit contains AppConfig.plist, which is not allowed." | ||
exit 1 | ||
fi |