[#124] Makefile: Add pre-commit related targets
Add the following targets: - `pre-commit` to install pre-commit hooks - `unpre-commit` to uninstall pre-commit hooks - `pre-commit-run` to run pre-commit hooks Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
parent
af7db13d51
commit
88789d5f4a
1 changed files with 15 additions and 0 deletions
15
Makefile
15
Makefile
|
@ -120,6 +120,21 @@ lint:
|
|||
$(LINT_DIR)/golangci-lint run
|
||||
|
||||
|
||||
.PHONY: pre-commit unpre-commit pre-commit-run
|
||||
|
||||
# Activate pre-commit hooks
|
||||
pre-commit:
|
||||
pre-commit install --hook-type pre-commit
|
||||
|
||||
# Deactivate pre-commit hooks
|
||||
unpre-commit:
|
||||
pre-commit uninstall --hook-type pre-commit
|
||||
|
||||
# Run pre-commit hooks
|
||||
pre-commit-run:
|
||||
@pre-commit run --all-files --hook-stage manual
|
||||
|
||||
|
||||
# Print version
|
||||
version:
|
||||
@echo $(VERSION)
|
||||
|
|
Loading…
Reference in a new issue