You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+67-67Lines changed: 67 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,75 +39,75 @@ It is client side so the users browser will do the work.
39
39
- TELBlazor\TELBlazor.Components.ShowCase.E2ETests\bin\Debug\net8.0\playwright.ps1 need to be run as admin
40
40
- local hook for commits, recommended for pre commit, and pre push as can only check the commit name value post commit
41
41
42
-
`
43
-
# --- Commitlint Logic (force local config) ---
44
-
REPO_ROOT=$(git rev-parse --show-toplevel)
45
-
CONFIG_PATH="$REPO_ROOT/.commitlintrc.json"
46
-
echo "COMMIT_MSG_FILE is one msg behind it is only set to the commit your trying to commit after the commit succeeds so this script is one behind"
47
-
echo "so would work best in prepush template"
48
-
COMMIT_MSG_FILE="$REPO_ROOT/.git/COMMIT_EDITMSG"
49
-
50
-
# Check if the local .commitlintrc.json exists in the repository root
51
-
if [ -f "$CONFIG_PATH" ]; then
52
-
53
-
echo "✅ Local .commitlintrc.json found at: $CONFIG_PATH. Running commitlint..."
54
-
echo "⚠️ if commit lint fails in precommit its actually reading previous commit name you need to reset or squash make a new commit and change .git/COMMIT_EDITMSG to something that would pass. ⚠️"
55
-
56
-
if command -v npx &> /dev/null; then
57
-
58
-
cd "$REPO_ROOT" || exit 1
59
-
60
-
# Debug: Print the commit message file content
61
-
if [ -f "$COMMIT_MSG_FILE" ]; then
62
-
echo "Commit message content:"
63
-
cat "$COMMIT_MSG_FILE"
64
-
else
65
-
echo "❌ Commit message file not found!"
42
+
```
43
+
# --- Commitlint Logic (force local config) ---
44
+
REPO_ROOT=$(git rev-parse --show-toplevel)
45
+
CONFIG_PATH="$REPO_ROOT/.commitlintrc.json"
46
+
echo "COMMIT_MSG_FILE is one msg behind it is only set to the commit your trying to commit after the commit succeeds so this script is one behind"
47
+
echo "so would work best in prepush template"
48
+
COMMIT_MSG_FILE="$REPO_ROOT/.git/COMMIT_EDITMSG"
49
+
50
+
# Check if the local .commitlintrc.json exists in the repository root
51
+
if [ -f "$CONFIG_PATH" ]; then
52
+
53
+
echo "✅ Local .commitlintrc.json found at: $CONFIG_PATH. Running commitlint..."
54
+
echo "⚠️ if commit lint fails in precommit its actually reading previous commit name you need to reset or squash make a new commit and change .git/COMMIT_EDITMSG to something that would pass. ⚠️"
55
+
56
+
if command -v npx &> /dev/null; then
57
+
58
+
cd "$REPO_ROOT" || exit 1
59
+
60
+
# Debug: Print the commit message file content
61
+
if [ -f "$COMMIT_MSG_FILE" ]; then
62
+
echo "Commit message content:"
63
+
cat "$COMMIT_MSG_FILE"
64
+
else
65
+
echo "❌ Commit message file not found!"
66
+
exit 1
67
+
fi
68
+
69
+
70
+
# Run commitlint, explicitly pointing to the local config and providing the commit message via stdin
0 commit comments