From 4addfea745e01c4e0167bad40042963968e94702 Mon Sep 17 00:00:00 2001 From: Chris Guidry Date: Fri, 6 Sep 2024 11:26:41 -0400 Subject: [PATCH] Installs pre-commit as part of the toolchain (#71) --- .mise.toml | 1 + Makefile | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.mise.toml b/.mise.toml index c8bb7e4..0a95e6e 100644 --- a/.mise.toml +++ b/.mise.toml @@ -8,3 +8,4 @@ kubectl = '1.31' kustomize = '5.3.0' setup-envtest = '0.17.0' yamllint = '1.35.1' +pre-commit = '3.8.0' diff --git a/Makefile b/Makefile index a2f036f..b9d8b6e 100644 --- a/Makefile +++ b/Makefile @@ -24,10 +24,19 @@ ENVTEST ?= setup-envtest GOLANGCI_LINT ?= golangci-lint GINKGO ?= ginkgo -.PHONY: tools -tools: +.PHONY: all +all: tools build + +.PHONY: mise +mise: @mise install --yes +.git/hooks/pre-commit: + @pre-commit install + +.PHONY: tools +tools: mise .git/hooks/pre-commit + .PHONY: tools-list tools-list: @mise list --current @@ -37,9 +46,6 @@ tools-list: SHELL = /usr/bin/env bash -o pipefail .SHELLFLAGS = -ec -.PHONY: all -all: build - ##@ General # The help target prints out all targets with their descriptions organized