New package: dep

This commit is contained in:
Andrea Brancaleoni 2017-09-15 19:18:31 +02:00 committed by Andrea Brancaleoni
parent 70e9a87b92
commit d8f6972200
2 changed files with 29 additions and 1 deletions

View file

@ -3,12 +3,17 @@
#
do_build() {
local path="${GOPATH}/src/${go_import_path}"
if [[ "${go_get}" != "yes" ]]; then
local path="${GOPATH}/src/${go_import_path}"
mkdir -p "$(dirname ${path})"
ln -fs $PWD "${path}"
fi
if [[ -x /usr/bin/dep ]]; then
cd "${path}"
dep ensure
fi
go_package=${go_package:-$go_import_path}
go get -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
}