package.sh 762 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. SRC_JAR_NAME=java-tsdb-hf-stck
  7. DST_DIR_NAME=java-tsdb-hf-stck-demo
  8. mkdir -p $ROOT/release/$DST_DIR_NAME
  9. rm -rf $ROOT/release/$DST_DIR_NAME/*
  10. mkdir -p $ROOT/release/$DST_DIR_NAME/log
  11. mkdir -p $ROOT/release/$DST_DIR_NAME/lib
  12. cp -rf $ROOT/target/$SRC_JAR_NAME-1.0-SNAPSHOT.jar $ROOT/release/$DST_DIR_NAME/lib/dbapi.jar
  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/$DST_DIR_NAME-v${version}-${cur_date}.tar.gz $DST_DIR_NAME
  19. echo "打包成功"