build.sh 427 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. # 版本号
  3. app_name="gen"
  4. # 构建目录
  5. dist_dir="dist"
  6. # 输出目录
  7. target_dir="$dist_dir/$app_name"
  8. echo "开始构建..."
  9. cd front
  10. sh build.sh
  11. cd ..
  12. mvn clean package
  13. echo "复制文件到$target_dir"
  14. rm -rf $dist_dir
  15. mkdir -p $target_dir
  16. cp -r gen/target/*.jar $target_dir/gen.jar
  17. cp -r script/* $target_dir
  18. echo "打成zip包"
  19. cd $dist_dir
  20. zip -r -q "$app_name.zip" $app_name
  21. echo "构建完毕"