From 092a2197ff64d4a4b33fbe9d1080f37e9319d346 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 9 May 2023 10:24:36 +0200 Subject: [PATCH 1/7] [release/2.8] fix package name in Dockerfile The 2.8 release is still named github.com/docker/distribution. Signed-off-by: Sebastiaan van Stijn --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ce1a734b08..ccdba1a7e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,9 +17,9 @@ ENV CGO_ENABLED=0 # or "git describe" to define the version info. ARG GIT_REF ARG TARGETPLATFORM -ARG PKG="github.com/distribution/distribution" +ARG PKG="github.com/docker/distribution" ARG BUILDTAGS="include_oss include_gcs" -RUN --mount=type=bind,rw \ +RUN --mount=type=bind,target=/go/src/github.com/docker/distribution,rw \ --mount=type=cache,target=/root/.cache/go-build \ --mount=target=/go/pkg/mod,type=cache \ goreleaser-xx --debug \ From 2392893bcfe7de3010c66626db46f59ab520c9a0 Mon Sep 17 00:00:00 2001 From: Wang Yan Date: Tue, 6 Jul 2021 11:43:13 +0800 Subject: [PATCH 2/7] bump up golang v1.17 Signed-off-by: Wang Yan (cherry picked from commit 3f4c558dac40dfb4fe13285ffc43a0d738d3a3f0) Signed-off-by: Sebastiaan van Stijn --- .github/workflows/ci.yml | 4 ++-- Dockerfile | 2 +- registry/handlers/basicauth.go | 1 + registry/handlers/basicauth_prego14.go | 1 + registry/storage/blobwriter_nonresumable.go | 1 + registry/storage/blobwriter_resumable.go | 1 + registry/storage/driver/gcs/gcs.go | 1 + registry/storage/driver/gcs/gcs_test.go | 1 + registry/storage/driver/oss/oss.go | 1 + registry/storage/driver/oss/oss_test.go | 1 + script/validate/dco | 2 +- 11 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4064d1c8c6..ae213c014d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,13 +25,13 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16.* + go-version: 1.17.* - name: Dependencies run: | sudo apt-get -q update sudo -E apt-get -yq --no-install-suggests --no-install-recommends install python2-minimal - cd /tmp && go get -u github.com/vbatts/git-validation + cd /tmp && go install github.com/vbatts/git-validation@latest - name: Build working-directory: ./src/github.com/docker/distribution diff --git a/Dockerfile b/Dockerfile index ccdba1a7e3..8aed01d6b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1.3 -ARG GO_VERSION=1.16.15 +ARG GO_VERSION=1.17 ARG GORELEASER_XX_VERSION=1.2.5 FROM --platform=$BUILDPLATFORM crazymax/goreleaser-xx:${GORELEASER_XX_VERSION} AS goreleaser-xx diff --git a/registry/handlers/basicauth.go b/registry/handlers/basicauth.go index 8727a3cd15..a41965dcfa 100644 --- a/registry/handlers/basicauth.go +++ b/registry/handlers/basicauth.go @@ -1,3 +1,4 @@ +//go:build go1.4 // +build go1.4 package handlers diff --git a/registry/handlers/basicauth_prego14.go b/registry/handlers/basicauth_prego14.go index 6cf10a25e9..01290adfed 100644 --- a/registry/handlers/basicauth_prego14.go +++ b/registry/handlers/basicauth_prego14.go @@ -1,3 +1,4 @@ +//go:build !go1.4 // +build !go1.4 package handlers diff --git a/registry/storage/blobwriter_nonresumable.go b/registry/storage/blobwriter_nonresumable.go index 32f130974c..38267cf605 100644 --- a/registry/storage/blobwriter_nonresumable.go +++ b/registry/storage/blobwriter_nonresumable.go @@ -1,3 +1,4 @@ +//go:build noresumabledigest // +build noresumabledigest package storage diff --git a/registry/storage/blobwriter_resumable.go b/registry/storage/blobwriter_resumable.go index b970e86570..8406cfd1f5 100644 --- a/registry/storage/blobwriter_resumable.go +++ b/registry/storage/blobwriter_resumable.go @@ -1,3 +1,4 @@ +//go:build !noresumabledigest // +build !noresumabledigest package storage diff --git a/registry/storage/driver/gcs/gcs.go b/registry/storage/driver/gcs/gcs.go index 86dc87f142..66d0d1ad71 100644 --- a/registry/storage/driver/gcs/gcs.go +++ b/registry/storage/driver/gcs/gcs.go @@ -10,6 +10,7 @@ // Note that the contents of incomplete uploads are not accessible even though // Stat returns their length // +//go:build include_gcs // +build include_gcs package gcs diff --git a/registry/storage/driver/gcs/gcs_test.go b/registry/storage/driver/gcs/gcs_test.go index e58216be04..4ae9aa3fdd 100644 --- a/registry/storage/driver/gcs/gcs_test.go +++ b/registry/storage/driver/gcs/gcs_test.go @@ -1,3 +1,4 @@ +//go:build include_gcs // +build include_gcs package gcs diff --git a/registry/storage/driver/oss/oss.go b/registry/storage/driver/oss/oss.go index 1dcf42b87c..8738b1e0c1 100644 --- a/registry/storage/driver/oss/oss.go +++ b/registry/storage/driver/oss/oss.go @@ -7,6 +7,7 @@ // Because OSS is a key, value store the Stat call does not support last modification // time for directories (directories are an abstraction for key, value stores) // +//go:build include_oss // +build include_oss package oss diff --git a/registry/storage/driver/oss/oss_test.go b/registry/storage/driver/oss/oss_test.go index 438d9a48ee..e042bb754f 100644 --- a/registry/storage/driver/oss/oss_test.go +++ b/registry/storage/driver/oss/oss_test.go @@ -1,3 +1,4 @@ +//go:build include_oss // +build include_oss package oss diff --git a/script/validate/dco b/script/validate/dco index 7b15eacf14..480b378f4d 100755 --- a/script/validate/dco +++ b/script/validate/dco @@ -4,7 +4,7 @@ set -eu -o pipefail if ! command -v git-validation; then >&2 echo "ERROR: git-validation not found. Install with:" - >&2 echo " go get -u github.com/vbatts/git-validation" + >&2 echo " go install github.com/vbatts/git-validation@latest" exit 1 fi From 14bd72bcf8b8a2759e765d3a766b53c9141b677b Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 3 May 2022 20:07:03 +0200 Subject: [PATCH 3/7] Dockerfile: switch to xx Signed-off-by: CrazyMax (cherry picked from commit 87f93ede9e5de6e86a2d2aefb2d5d8fe7ce98274) Signed-off-by: Sebastiaan van Stijn --- .dockerignore | 1 + .github/workflows/build.yml | 1 - Dockerfile | 65 +++++++++++++++++++++---------------- docker-bake.hcl | 21 ++++-------- 4 files changed, 44 insertions(+), 44 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..e660fd93d3 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +bin/ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22d16e7499..7da7e640d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,7 +87,6 @@ jobs: draft: true files: | bin/*.tar.gz - bin/*.zip bin/*.sha256 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 8aed01d6b5..aab0a9615b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,49 +1,58 @@ -# syntax=docker/dockerfile:1.3 +# syntax=docker/dockerfile:1 ARG GO_VERSION=1.17 -ARG GORELEASER_XX_VERSION=1.2.5 +ARG XX_VERSION=1.1.0 -FROM --platform=$BUILDPLATFORM crazymax/goreleaser-xx:${GORELEASER_XX_VERSION} AS goreleaser-xx +FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS base -COPY --from=goreleaser-xx / / -RUN apk add --no-cache file git +COPY --from=xx / / +RUN apk add --no-cache bash coreutils file git +ENV GO111MODULE=auto +ENV CGO_ENABLED=0 WORKDIR /go/src/github.com/docker/distribution +FROM base AS version +ARG PKG="github.com/docker/distribution" +RUN --mount=target=. \ + VERSION=$(git describe --match 'v[0-9]*' --dirty='.m' --always --tags) REVISION=$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi); \ + echo "-X ${PKG}/version.Version=${VERSION#v} -X ${PKG}/version.Revision=${REVISION} -X ${PKG}/version.Package=${PKG}" | tee /tmp/.ldflags; \ + echo -n "${VERSION}" | tee /tmp/.version; + FROM base AS build -ENV GO111MODULE=auto -ENV CGO_ENABLED=0 -# GIT_REF is used by goreleaser-xx to handle the proper git ref when available. -# It will fallback to the working tree info if empty and use "git tag --points-at" -# or "git describe" to define the version info. -ARG GIT_REF ARG TARGETPLATFORM -ARG PKG="github.com/docker/distribution" +ARG LDFLAGS="-s -w" ARG BUILDTAGS="include_oss include_gcs" RUN --mount=type=bind,target=/go/src/github.com/docker/distribution,rw \ --mount=type=cache,target=/root/.cache/go-build \ --mount=target=/go/pkg/mod,type=cache \ - goreleaser-xx --debug \ - --name="registry" \ - --dist="/out" \ - --main="./cmd/registry" \ - --flags="-v" \ - --ldflags="-s -w -X '$PKG/version.Version={{.Version}}' -X '$PKG/version.Revision={{.Commit}}' -X '$PKG/version.Package=$PKG'" \ - --tags="$BUILDTAGS" \ - --files="LICENSE" \ - --files="README.md" - -FROM scratch AS artifact -COPY --from=build /out/*.tar.gz / -COPY --from=build /out/*.zip / -COPY --from=build /out/*.sha256 / + --mount=type=bind,source=/tmp/.ldflags,target=/tmp/.ldflags,from=version \ + set -x ; xx-go build -trimpath -ldflags "$(cat /tmp/.ldflags) ${LDFLAGS}" -o /usr/bin/registry ./cmd/registry \ + && xx-verify --static /usr/bin/registry FROM scratch AS binary -COPY --from=build /usr/local/bin/registry* / +COPY --from=build /usr/bin/registry / + +FROM base AS releaser +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT +WORKDIR /work +RUN --mount=from=binary,target=/build \ + --mount=type=bind,target=/src \ + --mount=type=bind,source=/tmp/.version,target=/tmp/.version,from=version \ + VERSION=$(cat /tmp/.version) \ + && mkdir -p /out \ + && cp /build/registry /src/README.md /src/LICENSE . \ + && tar -czvf "/out/registry_${VERSION#v}_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}.tar.tgz" * \ + && sha256sum -z "/out/registry_${VERSION#v}_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}.tar.tgz" | awk '{ print $1 }' > "/out/registry_${VERSION#v}_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}.tar.tgz.sha256" + +FROM scratch AS artifact +COPY --from=releaser /out / FROM alpine:3.16 RUN apk add --no-cache ca-certificates COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml -COPY --from=build /usr/local/bin/registry /bin/registry +COPY --from=binary /registry /bin/registry VOLUME ["/var/lib/registry"] EXPOSE 5000 ENTRYPOINT ["registry"] diff --git a/docker-bake.hcl b/docker-bake.hcl index 4dd5a100c1..91686e608a 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,15 +1,3 @@ -// GITHUB_REF is the actual ref that triggers the workflow -// https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables -variable "GITHUB_REF" { - default = "" -} - -target "_common" { - args = { - GIT_REF = GITHUB_REF - } -} - group "default" { targets = ["image-local"] } @@ -20,13 +8,11 @@ target "docker-metadata-action" { } target "binary" { - inherits = ["_common"] target = "binary" output = ["./bin"] } target "artifact" { - inherits = ["_common"] target = "artifact" output = ["./bin"] } @@ -43,8 +29,13 @@ target "artifact-all" { ] } +// Special target: https://github.com/docker/metadata-action#bake-definition +target "docker-metadata-action" { + tags = ["registry:local"] +} + target "image" { - inherits = ["_common", "docker-metadata-action"] + inherits = ["docker-metadata-action"] } target "image-local" { From 19b3feb5dfeac86148971785ca36190091a4803e Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 20 Jul 2022 01:38:26 +0200 Subject: [PATCH 4/7] Update to xx 1.1.1 Signed-off-by: CrazyMax (cherry picked from commit 52a88c596b5e147a6607650b9c032aa8b1067b42) Signed-off-by: Sebastiaan van Stijn --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aab0a9615b..de2ac40d69 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 ARG GO_VERSION=1.17 -ARG XX_VERSION=1.1.0 +ARG XX_VERSION=1.1.1 FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS base From 018472de2d95025485d3e5429ea92dd18ce2665d Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 20 Jul 2022 14:19:39 +0200 Subject: [PATCH 5/7] dockerfiles: set ALPINE_VERSION Signed-off-by: CrazyMax (cherry picked from commit b066451b4029c4b063c06e65390a92e56a668a43) Signed-off-by: Sebastiaan van Stijn --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index de2ac40d69..53f8d818c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ # syntax=docker/dockerfile:1 ARG GO_VERSION=1.17 +ARG ALPINE_VERSION=3.16 ARG XX_VERSION=1.1.1 FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx -FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS base +FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base COPY --from=xx / / RUN apk add --no-cache bash coreutils file git ENV GO111MODULE=auto @@ -49,7 +50,7 @@ RUN --mount=from=binary,target=/build \ FROM scratch AS artifact COPY --from=releaser /out / -FROM alpine:3.16 +FROM alpine:${ALPINE_VERSION} RUN apk add --no-cache ca-certificates COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml COPY --from=binary /registry /bin/registry From db1389e0432ccd16c37c580c95ff2dd1853b8345 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 20 Jul 2022 16:44:31 +0200 Subject: [PATCH 6/7] dockerfiles: formatting Signed-off-by: CrazyMax (cherry picked from commit 0e17e5409133bf70576844a1031e579ff3634d82) Signed-off-by: Sebastiaan van Stijn --- Dockerfile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 53f8d818c0..2fd743b617 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,11 +24,11 @@ ARG TARGETPLATFORM ARG LDFLAGS="-s -w" ARG BUILDTAGS="include_oss include_gcs" RUN --mount=type=bind,target=/go/src/github.com/docker/distribution,rw \ - --mount=type=cache,target=/root/.cache/go-build \ - --mount=target=/go/pkg/mod,type=cache \ - --mount=type=bind,source=/tmp/.ldflags,target=/tmp/.ldflags,from=version \ - set -x ; xx-go build -trimpath -ldflags "$(cat /tmp/.ldflags) ${LDFLAGS}" -o /usr/bin/registry ./cmd/registry \ - && xx-verify --static /usr/bin/registry + --mount=type=cache,target=/root/.cache/go-build \ + --mount=target=/go/pkg/mod,type=cache \ + --mount=type=bind,source=/tmp/.ldflags,target=/tmp/.ldflags,from=version \ + set -x ; xx-go build -trimpath -ldflags "$(cat /tmp/.ldflags) ${LDFLAGS}" -o /usr/bin/registry ./cmd/registry \ + && xx-verify --static /usr/bin/registry FROM scratch AS binary COPY --from=build /usr/bin/registry / @@ -39,13 +39,13 @@ ARG TARGETARCH ARG TARGETVARIANT WORKDIR /work RUN --mount=from=binary,target=/build \ - --mount=type=bind,target=/src \ - --mount=type=bind,source=/tmp/.version,target=/tmp/.version,from=version \ - VERSION=$(cat /tmp/.version) \ - && mkdir -p /out \ - && cp /build/registry /src/README.md /src/LICENSE . \ - && tar -czvf "/out/registry_${VERSION#v}_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}.tar.tgz" * \ - && sha256sum -z "/out/registry_${VERSION#v}_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}.tar.tgz" | awk '{ print $1 }' > "/out/registry_${VERSION#v}_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}.tar.tgz.sha256" + --mount=type=bind,target=/src \ + --mount=type=bind,source=/tmp/.version,target=/tmp/.version,from=version \ + VERSION=$(cat /tmp/.version) \ + && mkdir -p /out \ + && cp /build/registry /src/README.md /src/LICENSE . \ + && tar -czvf "/out/registry_${VERSION#v}_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}.tar.tgz" * \ + && sha256sum -z "/out/registry_${VERSION#v}_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}.tar.tgz" | awk '{ print $1 }' > "/out/registry_${VERSION#v}_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}.tar.tgz.sha256" FROM scratch AS artifact COPY --from=releaser /out / From 70db3a46d9badbde6a1533e799e292d2ff10b430 Mon Sep 17 00:00:00 2001 From: Wang Yan Date: Tue, 29 Nov 2022 22:42:26 +0800 Subject: [PATCH 7/7] bump up golang version upgrade go version to v1.18.8 Signed-off-by: Wang Yan --- .github/workflows/ci.yml | 4 ++-- Dockerfile | 2 +- Makefile | 2 +- context/http.go | 6 +----- project/dev-image/Dockerfile | 2 +- registry/client/repository.go | 4 +--- script/setup/install-dev-tools | 6 +++--- version/version.sh | 2 +- 8 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae213c014d..a6e76792ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17.* + go-version: 1.18.8 - name: Dependencies run: | @@ -39,7 +39,7 @@ jobs: DCO_VERBOSITY=-q script/validate/dco GO111MODULE=on script/setup/install-dev-tools script/validate/vendor - go build -i . + go build . make check make build make binaries diff --git a/Dockerfile b/Dockerfile index 2fd743b617..bfa4a694a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.17 +ARG GO_VERSION=1.18.8 ARG ALPINE_VERSION=3.16 ARG XX_VERSION=1.1.1 diff --git a/Makefile b/Makefile index 331da27328..75e1182015 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ version/version.go: check: ## run all linters (TODO: enable "unused", "varcheck", "ineffassign", "unconvert", "staticheck", "goimports", "structcheck") @echo "$(WHALE) $@" - golangci-lint run + @GO111MODULE=off golangci-lint run test: ## run tests, except integration test with test.short @echo "$(WHALE) $@" diff --git a/context/http.go b/context/http.go index bc22f0bba1..48e3548653 100644 --- a/context/http.go +++ b/context/http.go @@ -246,11 +246,7 @@ func (ctx *muxVarsContext) Value(key interface{}) interface{} { return ctx.vars } - if strings.HasPrefix(keyStr, "vars.") { - keyStr = strings.TrimPrefix(keyStr, "vars.") - } - - if v, ok := ctx.vars[keyStr]; ok { + if v, ok := ctx.vars[strings.TrimPrefix(keyStr, "vars.")]; ok { return v } } diff --git a/project/dev-image/Dockerfile b/project/dev-image/Dockerfile index 1e2a8471cf..ec404a9f54 100644 --- a/project/dev-image/Dockerfile +++ b/project/dev-image/Dockerfile @@ -17,4 +17,4 @@ RUN wget https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz --quiet && \ tar -C /usr/local -xzf go$GOLANG_VERSION.linux-amd64.tar.gz && \ rm go${GOLANG_VERSION}.linux-amd64.tar.gz -RUN go get github.com/axw/gocov/gocov github.com/mattn/goveralls github.com/golang/lint/golint +RUN go install github.com/axw/gocov/gocov@latest github.com/mattn/goveralls@latest github.com/golang/lint/golint@latest diff --git a/registry/client/repository.go b/registry/client/repository.go index 3e2ae66d3c..04e5a3ba01 100644 --- a/registry/client/repository.go +++ b/registry/client/repository.go @@ -114,9 +114,7 @@ func (r *registry) Repositories(ctx context.Context, entries []string, last stri return 0, err } - for cnt := range ctlg.Repositories { - entries[cnt] = ctlg.Repositories[cnt] - } + copy(entries, ctlg.Repositories) numFilled = len(ctlg.Repositories) link := resp.Header.Get("Link") diff --git a/script/setup/install-dev-tools b/script/setup/install-dev-tools index f01c370e92..7737836bb9 100755 --- a/script/setup/install-dev-tools +++ b/script/setup/install-dev-tools @@ -1,6 +1,6 @@ #!/usr/bin/env bash -GOLANGCI_LINT_VERSION="v1.27.0" +GOLANGCI_LINT_VERSION="v1.50.1" # # Install developer tools to $GOBIN (or $GOPATH/bin if unset) @@ -8,5 +8,5 @@ GOLANGCI_LINT_VERSION="v1.27.0" set -eu -o pipefail cd /tmp -go get -u github.com/LK4D4/vndr -go get "github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}" +go install github.com/LK4D4/vndr@latest +go install "github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}" diff --git a/version/version.sh b/version/version.sh index 75dca78470..dd8296968b 100755 --- a/version/version.sh +++ b/version/version.sh @@ -17,7 +17,7 @@ var Package = "$(go list)" // Version indicates which version of the binary is running. This is set to // the latest release tag by hand, always suffixed by "+unknown". During // build, it will be replaced by the actual version. The value here will be -// used if the registry is run after a go get based install. +// used if the registry is run after a go install based install. var Version = "$(git describe --match 'v[0-9]*' --dirty='.m' --always)+unknown" // Revision is filled with the VCS (e.g. git) revision being used to build