Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 7a03644

Browse files
author
Ian Campbell
committed
Add a containerized make target to revendor
Uses the exact same version as the CI. This avoids needing to rely on everyone having the same version of `dep` installed in order to avoid spurious changes (especially inconvenient if you have multiple projects with different ideas). It's slightly annoying because (on Linux at least) it causes `vendor/*` to become owned by root (needing a `sudo chown` to repair), that's less annoying than having spurious vendoring changes due to tooling differences. Those who disagree can continue to use the non-containerized vendor target. Signed-off-by: Ian Campbell <[email protected]>
1 parent 6c881fc commit 7a03644

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docker.Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ lint: ## run linter(s)
108108
docker build -t $(LINT_IMAGE_NAME) -f Dockerfile.lint .
109109
docker run --rm $(LINT_IMAGE_NAME) make lint
110110

111+
vendor: build_dev_image
112+
$(info Update Vendoring...)
113+
docker run --rm -v "$(CURDIR)":/go/src/github.com/docker/app/ $(DEV_IMAGE_NAME) make vendor
114+
$(warning You may need to reset permissions on vendor/*)
115+
111116
check-vendor: build_dev_image
112117
$(info Check Vendoring...)
113118
docker run --rm $(DEV_IMAGE_NAME) sh -c "make vendor && hack/check-git-diff vendor"
@@ -137,4 +142,4 @@ push-invocation-image:
137142
help: ## this help
138143
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
139144

140-
.PHONY: lint test-e2e test-unit test cli-cross cross e2e-cross coverage gradle-test shell build_dev_image tars check-vendor schemas help invocation-image save-invocation-image save-invocation-image-tag push-invocation-image
145+
.PHONY: lint test-e2e test-unit test cli-cross cross e2e-cross coverage gradle-test shell build_dev_image tars vendor check-vendor schemas help invocation-image save-invocation-image save-invocation-image-tag push-invocation-image

0 commit comments

Comments
 (0)