1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/dockerfile/install/gotestsum.installer
Sebastiaan van Stijn 441aff3a17
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 <github@gone.nl>
2020-06-26 16:56:15 +02:00

9 lines
184 B
Bash
Executable file

#!/bin/sh
: ${GOTESTSUM_COMMIT:=v0.3.5}
install_gotestsum() (
set -e
export GO111MODULE=on
GOBIN="${PREFIX}" go get ${GO_BUILDMODE} "gotest.tools/gotestsum@${GOTESTSUM_COMMIT}"
)