Use GOPATH instead of PWD

pull/318/head
Rongjian Lan 6 years ago
parent 191b190547
commit 8e14357e44
  1. 13
      scripts/go_executable_build.sh
  2. 14
      scripts/travis_checker.sh
  3. 13
      test/deploy.sh

@ -13,16 +13,17 @@ GOARCH=amd64
FOLDER=/${WHOAMI:-$USER} FOLDER=/${WHOAMI:-$USER}
RACE= RACE=
export CGO_CFLAGS="-I$PWD/../bls/include -I$PWD/../mcl/include" HMY_PATH=$GOPATH/src/github.com/harmony-one
export CGO_LDFLAGS="-L$PWD/../bls/lib" export CGO_CFLAGS="-I$HMY_PATH/bls/include -I$HMY_PATH/mcl/include"
export LD_LIBRARY_PATH=$PWD/../bls/lib:$PWD/../mcl/lib export CGO_LDFLAGS="-L$HMY_PATH/bls/lib"
export LD_LIBRARY_PATH=$HMY_PATH/bls/lib:$HMY_PATH/mcl/lib
OS=$(uname -s) OS=$(uname -s)
case $OS in case $OS in
Darwin) Darwin)
export CGO_CFLAGS="-I$PWD/../bls/include -I$PWD/../mcl/include -I/usr/local/opt/openssl/include" export CGO_CFLAGS="-I$HMY_PATH/bls/include -I$HMY_PATH/mcl/include -I/usr/local/opt/openssl/include"
export CGO_LDFLAGS="-L$PWD/../bls/lib -L/usr/local/opt/openssl/lib" export CGO_LDFLAGS="-L$HMY_PATH/bls/lib -L/usr/local/opt/openssl/lib"
export LD_LIBRARY_PATH=$PWD/../bls/lib:$PWD/../mcl/lib:/usr/local/opt/openssl/lib export LD_LIBRARY_PATH=$HMY_PATH/bls/lib:$HMY_PATH/mcl/lib:/usr/local/opt/openssl/lib
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
;; ;;
esac esac

@ -33,20 +33,20 @@ dirnames() {
-e 's:^\./::' -e 's:^\./::'
} }
go_dirs="${tmpdir}/go_dirs.txt" go_dirs="${tmpdir}/go_dirs.txt"
dirnames < "${go_files}" | sort -u -t/ > "${go_dirs}" dirnames < "${go_files}" | sort -u -t/ > "${go_dirs}"
export CGO_CFLAGS="-I$PWD/../bls/include -I$PWD/../mcl/include" HMY_PATH=$GOPATH/src/github.com/harmony-one
export CGO_LDFLAGS="-L$PWD/../bls/lib" export CGO_CFLAGS="-I$HMY_PATH/bls/include -I$HMY_PATH/mcl/include"
export LD_LIBRARY_PATH=$PWD/../bls/lib:$PWD/../mcl/lib export CGO_LDFLAGS="-L$HMY_PATH/bls/lib"
export LD_LIBRARY_PATH=$HMY_PATH/bls/lib:$HMY_PATH/mcl/lib
OS=$(uname -s) OS=$(uname -s)
case $OS in case $OS in
Darwin) Darwin)
export CGO_CFLAGS="-I$PWD/../bls/include -I$PWD/../mcl/include -I/usr/local/opt/openssl/include" export CGO_CFLAGS="-I$HMY_PATH/bls/include -I$HMY_PATH/mcl/include -I/usr/local/opt/openssl/include"
export CGO_LDFLAGS="-L$PWD/../bls/lib -L/usr/local/opt/openssl/lib" export CGO_LDFLAGS="-L$HMY_PATH/bls/lib -L/usr/local/opt/openssl/lib"
export LD_LIBRARY_PATH=$PWD/../bls/lib:$PWD/../mcl/lib:/usr/local/opt/openssl/lib export LD_LIBRARY_PATH=$HMY_PATH/bls/lib:$HMY_PATH/mcl/lib:/usr/local/opt/openssl/lib
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
;; ;;
esac esac

@ -3,16 +3,17 @@
ROOT=$(dirname $0)/.. ROOT=$(dirname $0)/..
USER=$(whoami) USER=$(whoami)
export CGO_CFLAGS="-I$PWD/../bls/include -I$PWD/../mcl/include" HMY_PATH=$GOPATH/src/github.com/harmony-one
export CGO_LDFLAGS="-L$PWD/../bls/lib" export CGO_CFLAGS="-I$HMY_PATH/bls/include -I$HMY_PATH/mcl/include"
export LD_LIBRARY_PATH=$PWD/../bls/lib:$PWD/../mcl/lib export CGO_LDFLAGS="-L$HMY_PATH/bls/lib"
export LD_LIBRARY_PATH=$HMY_PATH/bls/lib:$HMY_PATH/mcl/lib
OS=$(uname -s) OS=$(uname -s)
case $OS in case $OS in
Darwin) Darwin)
export CGO_CFLAGS="-I$PWD/../bls/include -I$PWD/../mcl/include -I/usr/local/opt/openssl/include" export CGO_CFLAGS="-I$HMY_PATH/bls/include -I$HMY_PATH/mcl/include -I/usr/local/opt/openssl/include"
export CGO_LDFLAGS="-L$PWD/../bls/lib -L/usr/local/opt/openssl/lib" export CGO_LDFLAGS="-L$HMY_PATH/bls/lib -L/usr/local/opt/openssl/lib"
export LD_LIBRARY_PATH=$PWD/../bls/lib:$PWD/../mcl/lib:/usr/local/opt/openssl/lib export LD_LIBRARY_PATH=$HMY_PATH/bls/lib:$HMY_PATH/mcl/lib:/usr/local/opt/openssl/lib
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
;; ;;
esac esac

Loading…
Cancel
Save