build1.sh 457 B

123456789101112131415161718192021
  1. ############
  2. # autdop 编译,部署脚本
  3. ############
  4. #!/bin/sh
  5. APP=$1
  6. ENV=$2
  7. PROJ_DIR='/home/reghao/code/aha/autodop'
  8. DST_DIR='/home/reghao/tmp/autodop'
  9. if [ -d ${DST_DIR}/app ]; then
  10. rm -rf ${DST_DIR}/app/*
  11. rm -rf ${DST_DIR}/app.*
  12. else
  13. mkdir -p ${DST_DIR}/app
  14. fi
  15. cd ${PROJ_DIR}
  16. mvn clean package -P${ENV} -pl ${APP} -am
  17. cp ${APP}/target/${APP}-1.0.0.jar ${DST_DIR}/app/${APP}-1.0.0.jar
  18. cp scripts/run-jar.sh ${DST_DIR}/app/run-jar.sh
  19. mvn clean