build.sh 875 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/env bash
  2. VERSION="1.7.2-SNAPSHOT"
  3. LTS_BIN="${BASH_SOURCE-$0}"
  4. LTS_BIN="$(dirname "${LTS_BIN}")"
  5. LTS_Bin_Dir="$(cd "${LTS_BIN}"; pwd)"
  6. cd $LTS_Bin_Dir
  7. mvn clean install -U -DskipTests
  8. Dist_Bin_Dir="$LTS_Bin_Dir/dist/lts-$VERSION-bin"
  9. mkdir -p $Dist_Bin_Dir
  10. Dist_Bin_Dir="$(cd "$(dirname "${Dist_Bin_Dir}/.")"; pwd)"
  11. mkdir -p $Dist_Bin_Dir
  12. # 打包
  13. Startup_Dir="$LTS_Bin_Dir/lts-startup/"
  14. cd $Startup_Dir
  15. mvn clean assembly:assembly -DskipTests -Pdefault
  16. cp -rf $Startup_Dir/target/lts-bin/lts/* $Dist_Bin_Dir
  17. mkdir -p $Dist_Bin_Dir/war/jetty/lib
  18. mvn clean assembly:assembly -DskipTests -Plts-admin
  19. cp -rf $Startup_Dir/target/lts-bin/lts/lib $Dist_Bin_Dir/war/jetty
  20. cp -rf $LTS_Bin_Dir/lts-admin/target/lts-admin-$VERSION.war $Dist_Bin_Dir/war/lts-admin.war
  21. cd $LTS_Bin_Dir/dist
  22. zip -r lts-$VERSION-bin.zip lts-$VERSION-bin/*
  23. rm -rf lts-$VERSION-bin