This repository was archived by the owner on Jul 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ clean: ## clean build artifacts
107
107
108
108
vendor : # # update vendoring
109
109
$(call rmdir,vendor)
110
- dep ensure -v
110
+ dep ensure -v $( DEP_ARGS )
111
111
112
112
specification/bindata.go : specification/schemas/* .json
113
113
go generate github.com/docker/app/specification
Original file line number Diff line number Diff line change @@ -110,9 +110,21 @@ lint: ## run linter(s)
110
110
111
111
vendor : build_dev_image
112
112
$(info Update Vendoring...)
113
- docker run --rm -v " $( CURDIR) " :/go/src/github.com/docker/app/ $(DEV_IMAGE_NAME ) make vendor
113
+ docker rm -f docker-app-vendoring || true
114
+ # git bash, mingw and msys by default rewrite args that seems to be linux paths and try to expand that to a meaningful windows path
115
+ # we don't want that to happen when mounting paths referring to files located in the container. Thus we use the double "//" prefix that works
116
+ # both on windows, linux and macos
117
+ docker run -it --name docker-app-vendoring -v docker-app-vendor-cache://dep-cache -e DEPCACHEDIR=//dep-cache $(DEV_IMAGE_NAME ) sh -c " rm -rf ./vendor && make vendor DEP_ARGS=\" $( DEP_ARGS) \" "
118
+ rm -rf ./vendor
119
+ docker cp docker-app-vendoring:/go/src/github.com/docker/app/vendor .
120
+ docker cp docker-app-vendoring:/go/src/github.com/docker/app/Gopkg.lock .
121
+ docker rm -f docker-app-vendoring
114
122
$(warning You may need to reset permissions on vendor/* )
115
123
124
+ clean-vendor-cache :
125
+ docker rm -f docker-app-vendoring || true
126
+ docker volume rm -f docker-app-vendor-cache
127
+
116
128
check-vendor : build_dev_image
117
129
$(info Check Vendoring...)
118
130
docker run --rm $(DEV_IMAGE_NAME ) sh -c " make vendor && hack/check-git-diff vendor"
You can’t perform that action at this time.
0 commit comments