updatedep.sh 495 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. set -e
  3. if ! [[ "$0" =~ scripts/updatedep.sh ]]; then
  4. echo "must be run from repository root"
  5. exit 255
  6. fi
  7. if [ -d "gopath.proto" ]; then
  8. # gopath.proto is created by genproto.sh and it thoroughly messes
  9. # with go mod.
  10. echo "Remove gopath.proto before running this script"
  11. exit 255
  12. fi
  13. if [[ $(go version) != "go version go1.12"* ]]; then
  14. echo "expect Go 1.12+, got:" "$(go version)"
  15. exit 255
  16. fi
  17. GO111MODULE=on go mod tidy -v
  18. GO111MODULE=on go mod vendor -v