Factor build tool installation out into a script

For now it only moves protoc installation.  Support for version-pegging
“go get”-able tools is included, but since tools/tools.go lists no tools
yet, it is a no-op.  The list will be populated/migrated in later
commits.
pull/668/head
Eugene Kim 6 years ago
parent e080bfe902
commit ca6fd788ce
  1. 2
      .travis.yml
  2. 15
      scripts/install_build_tools.sh

@ -26,7 +26,7 @@ install:
- go get github.com/harmony-ek/gencodec
- go get github.com/golang/mock/mockgen
- go get github.com/golang/protobuf/protoc-gen-go
- ./scripts/install_protoc.sh -V 3.6.1
- scripts/install_build_tools.sh
script:
- go build -v ./...
- ./scripts/travis_checker.sh

@ -0,0 +1,15 @@
#!/bin/sh
set -eu
unset -v progdir
case "${0}" in
/*) progdir="/";;
*/*) progdir="${0%/*}";;
*) progdir=".";
esac
sed -n 's/^ _ "\([^"]*\)"$/\1/p' "${progdir}/../tools/tools.go" | \
xargs "${progdir}/goget.sh"
"${progdir}/install_protoc.sh" -V 3.6.1
Loading…
Cancel
Save