From 441aff3a1759ec51e54ef63bd3ba415fd59c41d3 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 24 Jun 2020 17:05:58 +0200 Subject: [PATCH] fix gotestsum.installer installing wrong version When using go modules, `go build` will always fetch the latest version of the package, so ignores the version we previously `go get`'d. Instead of running `go get` and `go build` separately, this patch uses `go get` (without the `-d` option) to do it all in one step. Given that this binary is only used for testing, and only used inside the Dockerfile, we should consider inlining this step in the Dockerfile itself, but keeping that separate for now. Signed-off-by: Sebastiaan van Stijn --- hack/dockerfile/install/gotestsum.installer | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hack/dockerfile/install/gotestsum.installer b/hack/dockerfile/install/gotestsum.installer index 45b747dbf9..02345de0dd 100755 --- a/hack/dockerfile/install/gotestsum.installer +++ b/hack/dockerfile/install/gotestsum.installer @@ -5,7 +5,5 @@ install_gotestsum() ( set -e export GO111MODULE=on - go get -d "gotest.tools/gotestsum@${GOTESTSUM_COMMIT}" - go build ${GO_BUILDMODE} -o "${PREFIX}/gotestsum" 'gotest.tools/gotestsum' - + GOBIN="${PREFIX}" go get ${GO_BUILDMODE} "gotest.tools/gotestsum@${GOTESTSUM_COMMIT}" )