sync.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/sh
  2. # 克隆项目源码,编译打包,部署到服务器
  3. CURRENT_DIR=`pwd`
  4. PROJECT_NAME="cooleshow"
  5. PROJECT_LIBS="libs"
  6. # 进入项目目录
  7. cd ${PROJECT_NAME}
  8. # 复制项目jar包到服务器
  9. rm -rf ${CURRENT_DIR}/${PROJECT_LIBS} && mkdir -p ${CURRENT_DIR}/${PROJECT_LIBS}
  10. echo "create jar dir done"
  11. cp service.md \
  12. cooleshow-user/user-admin/target/user-admin.jar \
  13. audio-analysis/target/audio-analysis.jar \
  14. cooleshow-auth/auth-server/target/auth-server.jar \
  15. cooleshow-bbs/target/cooleshow-bbs.jar \
  16. cooleshow-user/user-classroom/target/user-classroom.jar \
  17. cooleshow-cms/target/cooleshow-cms.jar \
  18. cooleshow-gateway/gateway-web/target/gateway-web.jar \
  19. cooleshow-mall/mall-admin/target/mall-admin.jar \
  20. cooleshow-mall/mall-portal/target/mall-portal.jar \
  21. cooleshow-user/user-student/target/user-student.jar \
  22. cooleshow-task/target/cooleshow-task.jar \
  23. cooleshow-user/user-teacher/target/user-teacher.jar \
  24. cooleshow-user/user-website/target/user-website.jar \
  25. cooleshow-user/user-tenant/target/user-tenant.jar \
  26. cooleshow-websocket/target/cooleshow-websocket.jar \
  27. ${CURRENT_DIR}/${PROJECT_LIBS}/
  28. echo "copy jar done"
  29. # 服务启动
  30. if [ -f ${CURRENT_DIR}/jenkins-server.sh ];then
  31. echo "./jenkins-server.sh server"
  32. cd ${CURRENT_DIR} && ./jenkins-server.sh server
  33. else
  34. echo "jenkins-server.sh not exist"
  35. exit 1;
  36. fi