Merge pull request #3412 from thaJeztah/fix_vendor

Some fixes for "make vendor"
This commit is contained in:
Sebastiaan van Stijn 2022-01-28 17:40:36 +01:00 committed by GitHub
commit 5bb88dc3c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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"'