From 98ad835a776b87d3a45730af28913317ddaeb0e8 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Tue, 19 Mar 2024 13:48:58 +0200 Subject: [PATCH] Add vendor and check-vendor make targets Signed-off-by: Evan Lezar --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 629b978b..ed23ef09 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ CMDS := $(patsubst ./cmd/%/,%,$(sort $(dir $(wildcard ./cmd/*/)))) CMD_TARGETS := $(patsubst %,cmd-%, $(CMDS)) CHECK_TARGETS := golangci-lint -MAKE_TARGETS := binaries build check fmt lint-internal test examples cmds coverage generate licenses $(CHECK_TARGETS) +MAKE_TARGETS := binaries build check fmt lint-internal test examples cmds coverage generate licenses vendor check-vendor $(CHECK_TARGETS) TARGETS := $(MAKE_TARGETS) $(EXAMPLE_TARGETS) $(CMD_TARGETS) @@ -90,6 +90,14 @@ goimports: golangci-lint: golangci-lint run ./... +vendor: + go mod tidy + go mod vendor + go mod verify + +check-vendor: vendor + git diff --quiet HEAD -- go.mod go.sum vendor + licenses: go-licenses csv $(MODULE)/...