build-styles: use go install instead of go build.

Fixes multi-package builds.

[ci skip]
This commit is contained in:
Noel Cower 2019-01-18 15:47:21 -08:00 committed by Michael Aldridge
parent 684d820712
commit e892b46432

View file

@ -33,7 +33,7 @@ do_build() {
# default behavior.
go_mod_mode=
fi
go build -o "${GOPATH}/bin/$(basename ${go_package})" -mod="${go_mod_mode}" -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
go install -mod="${go_mod_mode}" -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
else
# Otherwise, build using GOPATH
go get -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}