From 95ba67a30cfe7395d2ed2f1e8193a88a4569fb22 Mon Sep 17 00:00:00 2001 From: Lei Wang Date: Mon, 4 Jun 2018 14:28:47 -0700 Subject: [PATCH] Build: fix go package installation path. (#11166) --- paddle/scripts/paddle_build.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 8eeea1805d8..113d02ce486 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -145,19 +145,17 @@ function check_style() { trap 'abort' 0 set -e - # install glide - curl https://glide.sh/get | bash - eval "$(GIMME_GO_VERSION=1.8.3 gimme)" + if [ -x "$(command -v gimme)" ]; then + eval "$(GIMME_GO_VERSION=1.8.3 gimme)" + fi # set up go environment for running gometalinter mkdir -p $GOPATH/src/github.com/PaddlePaddle/ ln -sf ${PADDLE_ROOT} $GOPATH/src/github.com/PaddlePaddle/Paddle - cd $GOPATH/src/github.com/PaddlePaddle/Paddle/go; glide install; cd - - - go get github.com/alecthomas/gometalinter - gometalinter --install + mkdir -p ./build/go + cp go/glide.* build/go + cd build/go; glide install; cd - - cd ${PADDLE_ROOT} export PATH=/usr/bin:$PATH pre-commit install clang-format --version -- GitLab