-
Notifications
You must be signed in to change notification settings - Fork 7
Claude enhancements #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #!/bin/sh | ||
|
|
||
| echo "Running pre-commit hook..." | ||
|
|
||
| # Navigate to frontend directory | ||
| cd frontend || exit 1 | ||
|
|
||
| # Check if bun is installed | ||
| if ! command -v bun &> /dev/null; then | ||
| echo "Error: bun is not installed. Please install bun before committing." | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Run the build command | ||
| echo "Running bun build..." | ||
| if ! bun run build; then | ||
| echo "" | ||
| echo "Error: Build failed! Please fix the build errors before committing." | ||
| echo "Run 'cd frontend && bun run build' to see the errors." | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Build successful! Proceeding with commit..." | ||
| exit 0 |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,17 @@ | ||||||
| #!/bin/sh | ||||||
|
|
||||||
| echo "Setting up git hooks..." | ||||||
|
|
||||||
| # Get the root directory of the git repository | ||||||
| GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) | ||||||
|
|
||||||
| if [ -z "$GIT_ROOT" ]; then | ||||||
| echo "Error: Not in a git repository" | ||||||
| exit 1 | ||||||
| fi | ||||||
|
|
||||||
| # Set git to use our hooks directory | ||||||
| git config core.hooksPath .githooks | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Using a relative path (.githooks) could fail if script is run from a subdirectory. Use $GIT_ROOT/.githooks for reliability.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Check if .githooks directory exists before configuring it |
||||||
|
|
||||||
| echo "✅ Git hooks configured successfully!" | ||||||
| echo "The pre-commit hook will now run 'bun run build' before each commit." | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Missing step to clone the repository before running setup-hooks.sh