diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4064d1c8c..ae213c014 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 ccdba1a7e..8aed01d6b 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 8727a3cd1..a41965dcf 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 6cf10a25e..01290adfe 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 32f130974..38267cf60 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 b970e8657..8406cfd1f 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 86dc87f14..66d0d1ad7 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 e58216be0..4ae9aa3fd 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 1dcf42b87..8738b1e0c 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 438d9a48e..e042bb754 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 7b15eacf1..480b378f4 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