make_update.sh 472 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. #set -x
  3. if [ ! -d "${CI_PROJECT_DIR}/../src" ];then
  4. mkdir ${CI_PROJECT_DIR}/../src
  5. fi
  6. ln -fs ${CI_PROJECT_DIR} ${CI_PROJECT_DIR}/../src
  7. export GOPATH=${CI_PROJECT_DIR}/..
  8. echo "GOPATH: $GOPATH"
  9. vendor=${CI_PROJECT_DIR}/vendor
  10. for dir in $(ls $vendor)
  11. do
  12. if [ -d $vendor/$dir ]; then
  13. ln -fs $vendor/$dir $GOPATH/src
  14. fi
  15. done
  16. sleep $[ ( $RANDOM % 60 ) + 1 ]s
  17. cd ${CI_PROJECT_DIR}/../src/go-common
  18. #mkdir -p .git/hooks/pre-commit
  19. make bazel-update