Go框架demo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1008 B

3 years ago
  1. #!/bin/sh
  2. # run_bee.sh
  3. # This script for run beego projects for dev.
  4. # @version 170227:1
  5. # @author zhangxuhong <zhangxuhong@xitu.io>
  6. #
  7. # [config]
  8. echo "-[config]-"
  9. # ----------------------------[manual config here]------------------------------
  10. # REPO_SRC=/data/repo/collection_set_api
  11. # BUILD_TARGET=collection_set_api
  12. BEE_PATH=$2
  13. # ------------------------------------------------------------------------------
  14. echo -e "\033[34mREPO_SRC set to: ${REPO_SRC}\033[0m"
  15. echo -e "\033[34mBUILD_TARGET set to: ${BUILD_TARGET}\033[0m"
  16. echo ""
  17. sleep 1
  18. # [set env]
  19. echo "-[set env]-"
  20. # $GOBIN
  21. export GOBIN="${REPO_SRC}/bin"
  22. echo -e "\033[34mGOBIN set to: ${GOBIN}\033[0m"
  23. # $GOPATH
  24. export GOPATH="${REPO_SRC}"
  25. echo -e "\033[34mGOPATH set to: ${GOPATH}\033[0m"
  26. echo ""
  27. # run
  28. if [ "${BEE_PATH}" == "" ]; then
  29. echo "please input bee executable file loacation to run this scripts, like :"
  30. echo "./ci.sh run_bee /data/bin/bee"
  31. exit 1;
  32. fi
  33. `${BEE_PATH} run ${REPO_SRC}/src`
  34. echo "done."