mirror of https://github.com/docker/cli.git
Merge pull request #3412 from thaJeztah/fix_vendor
Some fixes for "make vendor"
This commit is contained in:
commit
5bb88dc3c4
|
@ -8,6 +8,7 @@ RUN apk add --no-cache bash git rsync
|
|||
WORKDIR /src
|
||||
|
||||
FROM base AS vendored
|
||||
ENV GOPROXY=direct
|
||||
RUN --mount=target=/context \
|
||||
--mount=target=.,type=tmpfs \
|
||||
--mount=target=/go/pkg/mod,type=cache <<EOT
|
||||
|
|
|
@ -21,11 +21,10 @@ go 1.16
|
|||
EOL
|
||||
|
||||
update() {
|
||||
(set -x ; go mod vendor -modfile=vendor.mod)
|
||||
(set -x ; go mod tidy -modfile=vendor.mod; go mod vendor -modfile=vendor.mod)
|
||||
}
|
||||
|
||||
validate() {
|
||||
(set -x ; go mod tidy -modfile=vendor.mod)
|
||||
diff=$(git status --porcelain -- vendor.mod vendor.sum vendor)
|
||||
if [ -n "$diff" ]; then
|
||||
echo >&2 'ERROR: Vendor result differs. Please vendor your package with "make -f docker.Makefile vendor"'
|
||||
|
|
Loading…
Reference in New Issue