packageApiDemoProject.sh 707 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. cur_date="`date +%Y-%m-%d`"
  3. version=1.0.0
  4. ROOT=$(cd `dirname $0`; pwd)
  5. echo $ROOT
  6. DST_DIR_NAME=cluster-dbapi-java-demo
  7. mkdir -p $ROOT/release/$DST_DIR_NAME
  8. rm -rf $ROOT/release/$DST_DIR_NAME/*
  9. mkdir -p $ROOT/release/$DST_DIR_NAME/log
  10. mkdir -p $ROOT/release/$DST_DIR_NAME/lib
  11. cp -rf $ROOT/lib/*.jar $ROOT/release/$DST_DIR_NAME/lib/
  12. cp -rf $ROOT/pomDemoProject.xml $ROOT/release/$DST_DIR_NAME/pom.xml
  13. mkdir -p $ROOT/release/$DST_DIR_NAME/src
  14. cp -rf $ROOT/src/test $ROOT/release/$DST_DIR_NAME/src/
  15. cp -rf $ROOT/README.md $ROOT/release/$DST_DIR_NAME/README.md
  16. cd $ROOT/release/
  17. tar -zcf $ROOT/release/cluster-dbapi-java-demo-v${version}-${cur_date}.tar.gz ./$DST_DIR_NAME
  18. echo "打包成功"