init.sh 536 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. source "bin/init/env.sh"
  3. CURR="plugin/relaybaton"
  4. CURR_PATH="$PROJECT/$CURR"
  5. git submodule update --init "$CURR/*"
  6. cd $CURR_PATH/src/main/go/relaybaton
  7. export GO111MOD=on
  8. export CGO_ENABLED=1
  9. export GO_ROOT="$(go env GOPATH)/src/github.com/cloudflare/go"
  10. if [ ! -d "$GO_ROOT/src" ]; then
  11. rm -rf $GO_ROOT
  12. git clone --depth 1 https://github.com/cloudflare/go.git "$GO_ROOT" || exit 1
  13. fi
  14. if [ ! -x "$GO_ROOT/bin/go" ]; then
  15. pushd $GO_ROOT/src
  16. ./make.bash || exit 1
  17. popd
  18. fi
  19. go mod download -x || exit 1