diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-02-19 16:56:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-19 16:56:04 +0100 |
commit | 7efcca2818178fd815f234f8be66aca5dc5a676f (patch) | |
tree | a897a45400692b3697c5f123abc69201140c338a | |
parent | 8c0df03debe064f0bf6595a54d48349c79385e8b (diff) | |
parent | 00e9db0822bee0ffc5d646d904631950a9bd0b27 (diff) | |
download | podman-7efcca2818178fd815f234f8be66aca5dc5a676f.tar.gz podman-7efcca2818178fd815f234f8be66aca5dc5a676f.tar.bz2 podman-7efcca2818178fd815f234f8be66aca5dc5a676f.zip |
Merge pull request #5248 from rhatdan/precommit
Add installation of pre-commit to Makefile
-rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 \ |