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
|
WORKDIR /src
|
||||||
|
|
||||||
FROM base AS vendored
|
FROM base AS vendored
|
||||||
|
ENV GOPROXY=direct
|
||||||
RUN --mount=target=/context \
|
RUN --mount=target=/context \
|
||||||
--mount=target=.,type=tmpfs \
|
--mount=target=.,type=tmpfs \
|
||||||
--mount=target=/go/pkg/mod,type=cache <<EOT
|
--mount=target=/go/pkg/mod,type=cache <<EOT
|
||||||
|
|
|
@ -21,11 +21,10 @@ go 1.16
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
(set -x ; go mod vendor -modfile=vendor.mod)
|
(set -x ; go mod tidy -modfile=vendor.mod; go mod vendor -modfile=vendor.mod)
|
||||||
}
|
}
|
||||||
|
|
||||||
validate() {
|
validate() {
|
||||||
(set -x ; go mod tidy -modfile=vendor.mod)
|
|
||||||
diff=$(git status --porcelain -- vendor.mod vendor.sum vendor)
|
diff=$(git status --porcelain -- vendor.mod vendor.sum vendor)
|
||||||
if [ -n "$diff" ]; then
|
if [ -n "$diff" ]; then
|
||||||
echo >&2 'ERROR: Vendor result differs. Please vendor your package with "make -f docker.Makefile vendor"'
|
echo >&2 'ERROR: Vendor result differs. Please vendor your package with "make -f docker.Makefile vendor"'
|
||||||
|
|
Loading…
Reference in New Issue