Skip to content

Commit

Permalink
scripts/updatedep: use Go 1.11 module for dependency management
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed Sep 21, 2018
1 parent 09d1426 commit ad2d18a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions scripts/updatedep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ if ! [[ "$0" =~ scripts/updatedep.sh ]]; then
exit 255
fi

go get -v -u github.com/golang/dep/cmd/dep

if [[ -z "$1" ]]; then
echo "dep ensure on all packages"
dep ensure -v
else
echo "dep update on" "$1"
# shellcheck disable=SC2086
dep ensure -v -update $1
if [[ $(go version) != "go version go1.11"* ]]; then
echo "expect Go 1.11+, got:" $(go version)
exit 255
fi

<<COMMENT
GO111MODULE=on go mod init
COMMENT

GO111MODULE=on go mod tidy -v
GO111MODULE=on go mod vendor -v

0 comments on commit ad2d18a

Please sign in to comment.