vp-build/common/build-style/go.sh
Dominik Honnef 2bb87e4e07 build-style/go: don't set GOBIN
Go 1.5 doesn't permit our use of GOBIN anymore, breaking
cross-compilation (for details, see
https://github.com/golang/go/issues/9769)

In retrospect, I'm not sure why we set GOBIN in the first place;
GOPATH/bin should suffice.

Closes #2337
2015-08-22 20:58:24 +02:00

22 lines
386 B
Bash

#
# This helper is for templates for Go packages.
#
do_build() {
if [[ "${go_get}" != "yes" ]]; then
local path="${GOPATH}/src/${go_import_path}"
mkdir -p "$(dirname ${path})"
ln -fs $PWD "${path}"
fi
go_package=${go_package:-$go_import_path}
go get -x ${go_package}
}
do_install() {
find "${GOPATH}/bin" -type f -executable | while read line
do
vbin "${line}"
done
}