Skip to content

Commit 03ea697

Browse files
committed
Decouple pre-commmit commit and push hooks
1 parent d0455a4 commit 03ea697

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,20 @@ help: # Preview Makefile commands
1212
# Python Environment and Dependency commands
1313
##############################################
1414

15-
install: .venv .git/hooks/pre-commit # Install Python dependencies and create virtual environment if not exists
15+
install: .venv .git/hooks/pre-commit .git/hooks/pre-push # Install Python dependencies and create virtual environment if not exists
1616
uv sync --dev
1717

1818
.venv: # Creates virtual environment if not found
1919
@echo "Creating virtual environment at .venv..."
2020
uv venv .venv
2121

22-
.git/hooks/pre-commit: # Sets up pre-commit hook if not setup
23-
@echo "Installing pre-commit hooks..."
24-
uv run pre-commit install --hook-type pre-push --hook-type pre-commit
22+
.git/hooks/pre-commit: # Sets up pre-commit commit hooks if not setup
23+
@echo "Installing pre-commit commit hooks..."
24+
uv run pre-commit install --hook-type pre-commit
25+
26+
.git/hooks/pre-push: # Sets up pre-commit push hooks if not setup
27+
@echo "Installing pre-commit push hooks..."
28+
uv run pre-commit install --hook-type pre-push
2529

2630
venv: .venv # Create the Python virtual environment
2731

0 commit comments

Comments
 (0)