Skip to content

Commit 1b7e9d5

Browse files
committed
Switch to GOTOOLCHAIN env setting from gimme
1 parent 11022e5 commit 1b7e9d5

File tree

5 files changed

+5
-1012
lines changed

5 files changed

+5
-1012
lines changed

LICENSES/third_party/gimme/LICENSE

-21
This file was deleted.

hack/setup-go.sh

+5-17
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,17 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
# script to setup go version with gimme as needed
16+
# script to setup go version as needed
1717
# MUST BE RUN FROM THE REPO ROOT DIRECTORY
1818

1919
# read go-version file unless GO_VERSION is set
2020
GO_VERSION="${GO_VERSION:-"$(cat .go-version)"}"
2121
GO_IMAGE=public.ecr.aws/docker/library/golang:$GO_VERSION
2222

23-
# we don't actually care where the .env files are
24-
# however, GIMME_SILENT_ENV doesn't trigger re-generating a .env if it
25-
# already exists and isn't "silent" (no `go version` command in it)
26-
# so we fix that by changing where the .env is written, ensuring ours
27-
# is generated from this repo and silent.
28-
export GIMME_ENV_PREFIX=./bin/.gimme/
29-
export GIMME_SILENT_ENV=y
30-
31-
# only setup go if we haven't set FORCE_HOST_GO, or `go version` doesn't match
32-
# go version output looks like:
33-
# go version go1.14.5 darwin/amd64
34-
if ! ([ -n "${FORCE_HOST_GO:-}" ] || \
35-
(command -v go >/dev/null && [ "$(go version | cut -d' ' -f3)" = "go${GO_VERSION}" ])); then
36-
# eval because the output of this is shell to set PATH etc.
37-
eval "$(hack/third_party/gimme/gimme "${GO_VERSION}")"
38-
fi
23+
# gotoolchain
24+
# https://go.dev/doc/toolchain
25+
export GOSUMDB="sum.golang.org"
26+
export GOTOOLCHAIN=go${GO_VERSION}
3927

4028
# force go modules
4129
export GO111MODULE=on

hack/third_party/gimme/LICENSE

-21
This file was deleted.

hack/third_party/gimme/README.md

-6
This file was deleted.

0 commit comments

Comments
 (0)