test: update testing script to install dependencies through dep

This commit is contained in:
Wilmer Paulino 2018-03-04 13:03:58 -05:00
parent 1dedc73a39
commit 8564da5723
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F
1 changed files with 6 additions and 6 deletions

View File

@ -93,7 +93,7 @@ lint_check() {
gometalinter.v1 --install 1>/dev/null
# Automatic checks
linter_targets=$(glide novendor | grep -v lnrpc)
linter_targets=$(go list -f '{{.Dir}}' ./... | grep -v lnrpc)
test -z "$(gometalinter.v1 --disable-all \
--enable=gofmt \
--enable=vet \
@ -134,17 +134,17 @@ while getopts "lrcio" flag; do
# remove the options from the positional parameters
shift $(( OPTIND - 1 ))
# Make sure glide is installed and $GOPATH/bin is in your path.
if [ ! -x "$(type -p glide)" ]; then
print "* Install glide"
go get -u github.com/Masterminds/glide
# Make sure dep is installed and $GOPATH/bin is in your path.
if [ ! -x "$(type -p dep)" ]; then
print "* Install dep"
go get -u github.com/golang/dep/cmd/dep
fi
# Install the dependency if vendor directory not exist or if flag have been
# specified.
if [ "$NEED_INSTALL" == "true" ] || [ ! -d "./vendor" ]; then
print "* Install dependencies"
glide install
dep ensure
fi
# Required for the integration tests