From 2392893bcfe7de3010c66626db46f59ab520c9a0 Mon Sep 17 00:00:00 2001 From: Wang Yan Date: Tue, 6 Jul 2021 11:43:13 +0800 Subject: [PATCH] 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 4064d1c8..ae213c01 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 ccdba1a7..8aed01d6 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 8727a3cd..a41965dc 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 6cf10a25..01290adf 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 32f13097..38267cf6 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 b970e865..8406cfd1 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 86dc87f1..66d0d1ad 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 e58216be..4ae9aa3f 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 1dcf42b8..8738b1e0 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 438d9a48..e042bb75 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 7b15eacf..480b378f 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