mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
Merge pull request #5248 from rhatdan/precommit
Add installation of pre-commit to Makefile
This commit is contained in:
8
Makefile
8
Makefile
@ -151,7 +151,7 @@ endif
|
||||
lint: golangci-lint
|
||||
@echo "Linting vs commit '$(call err_if_empty,EPOCH_TEST_COMMIT)'"
|
||||
ifeq ($(PRE_COMMIT),)
|
||||
@echo "FATAL: pre-commit was not found, check https://pre-commit.com/ about installing it." >&2
|
||||
@echo "FATAL: pre-commit was not found, make .install.pre-commit to installing it." >&2
|
||||
@exit 2
|
||||
endif
|
||||
$(PRE_COMMIT) run -a
|
||||
@ -562,6 +562,12 @@ endef
|
||||
.install.golangci-lint: .gopathok
|
||||
VERSION=1.18.0 GOBIN=$(GOBIN) sh ./hack/install_golangci.sh
|
||||
|
||||
.PHONY: .install.pre-commit
|
||||
.install.pre-commit:
|
||||
if [ -z "$(PRE_COMMIT)" ]; then \
|
||||
python3 -m pip install --user pre-commit; \
|
||||
fi
|
||||
|
||||
.PHONY: .install.md2man
|
||||
.install.md2man: .gopathok
|
||||
if [ ! -x "$(GOMD2MAN)" ]; then \
|
||||
|
Reference in New Issue
Block a user