-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat: add pre-commit hook config (#199)
Co-authored-by: welpo <welpo@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
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,7 @@ | ||
- id: git-sumi | ||
name: Lint commit message with git-sumi | ||
description: Lints each new commit with git-sumi based on the configured project rules in your sumi.toml | ||
entry: git-sumi --file | ||
language: rust | ||
pass_filenames: false | ||
stages: [commit-msg] |
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,16 @@ | ||
#!/usr/bin/env bash | ||
# Pre-release hook for the release script: https://github.com/welpo/release | ||
VERSION_TAG="$1" | ||
VERSION="${VERSION_TAG#v}" # Remove the 'v' prefix. | ||
WEBSITE_DOCS_PATH='website/docs/integration.md' | ||
|
||
# Update latest version in pre-commit hook docs. | ||
# -i: edit file in place | ||
# -pe: print and execute perl command | ||
perl -i -pe 's/(rev: v)\K[\d.]+(?=\s+#)/'$VERSION'/g' "$WEBSITE_DOCS_PATH" | ||
|
||
echo "Updated version in $WEBSITE_DOCS_PATH to:" | ||
grep "rev: v" "$WEBSITE_DOCS_PATH" || { | ||
echo "Error: Version update failed" | ||
exit 1 | ||
} |
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