validate and update vendor target

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-04-22 15:32:01 +02:00
parent 27b5563245
commit ffa3019c1f
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
4 changed files with 93 additions and 1 deletions

View file

@ -38,7 +38,7 @@ BINARIES=$(addprefix bin/,$(COMMANDS))
TESTFLAGS ?= -v $(TESTFLAGS_RACE)
TESTFLAGS_PARALLEL ?= 8
.PHONY: all build binaries check clean test test-race test-full integration coverage
.PHONY: all build binaries check clean test test-race test-full integration coverage validate-vendor vendor
.DEFAULT: all
all: binaries
@ -100,3 +100,13 @@ build:
clean: ## clean up binaries
@echo "$(WHALE) $@"
@rm -f $(BINARIES)
validate-vendor: ## validate vendor
docker buildx bake validate-vendor
vendor: ## update vendor
$(eval $@_TMP_OUT := $(shell mktemp -d -t buildx-output.XXXXXXXXXX))
docker buildx bake --set "*.output=$($@_TMP_OUT)" update-vendor
rm -rf ./vendor
cp -R "$($@_TMP_OUT)"/out/* .
rm -rf $($@_TMP_OUT)/*