Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 90e25f2

Browse files
committed
Fix bug in gotestsum installer causing dependencies to not be downloaded
Building gotestsum started to fail after the repository removed some dependencies on master. What happens is that first, we `go get` the package (with go modules disabled); GO111MODULE=off go get -d gotest.tools/gotestsum Which gets the latest version from master, and fetches the dependencies used on master. Then we checkout the version we want to install (for example `v0.3.5`) and run go build. However, `v0.3.5` depends on logrus, and given that we ran `go get` for `master`, that dependency was not fetched, and build fails. This patch modifies the installer to use go modules (alternatively we could probably run `go get .` after checking out the `v0.3.5` version), We need to modify all installers, as it looks like this is a standard pattern we use, but other dependencies were not failing (yet), so this patch only addresses the immediate failure. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 1d9da1b233314ed487093987293ed0057c919c6d) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 8f1ab4e6123fa95408636827d0683e674c002efb Component: engine
1 parent 23743ee commit 90e25f2

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

components/engine/hack/dockerfile/install/gotestsum.installer

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
: ${GOTESTSUM_COMMIT:=v0.3.5}
44

5-
install_gotestsum() {
6-
echo "Installing gotestsum version $GOTESTSUM_COMMIT"
7-
go get -d gotest.tools/gotestsum
8-
cd "$GOPATH/src/gotest.tools/gotestsum"
9-
git checkout -q "$GOTESTSUM_COMMIT"
5+
install_gotestsum() (
6+
set -e
7+
export GO111MODULE=on
8+
go get -d "gotest.tools/gotestsum@${GOTESTSUM_COMMIT}"
109
go build -buildmode=pie -o "${PREFIX}/gotestsum" 'gotest.tools/gotestsum'
11-
}
10+
11+
)

0 commit comments

Comments
 (0)