packageApiDemoProject.sh 787 B

1234567891011121314151617181920212223242526
  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/target/cluster-dbapi-java-pro-1.0-SNAPSHOT.jar $ROOT/lib/dbapi.jar
  12. cp -rf $ROOT/lib/*.jar $ROOT/release/$DST_DIR_NAME/lib/
  13. cp -rf $ROOT/pomDemoProject.xml $ROOT/release/$DST_DIR_NAME/pom.xml
  14. mkdir -p $ROOT/release/$DST_DIR_NAME/src
  15. cp -rf $ROOT/src/test $ROOT/release/$DST_DIR_NAME/src/
  16. cp -rf $ROOT/README.md $ROOT/release/$DST_DIR_NAME/README.md
  17. cd $ROOT/release/
  18. tar -zcf $ROOT/release/cluster-dbapi-java-demo-v${version}-${cur_date}.tar.gz ./$DST_DIR_NAME
  19. echo "打包成功"