123456789101112131415161718192021222324252627282930313233343536373839 |
- #!/bin/bash
- set -e
- base_dir=$(
- cd "$(dirname "$0")"
- pwd
- )
- cd $base_dir
- cur_date="`date +%Y-%m-%d`"
- # Init common
- rm -rf ./tmp
- mkdir -p ./tmp/tsdb
- cp -rf ./include ./tmp/tsdb/
- cp -rf ./demo ./tmp/tsdb/
- cp ./README.txt ./tmp/tsdb/
- mkdir -p ./tmp/tsdb/lib/aarch64
- mkdir -p ./tmp/tsdb/lib/x86-64
- # Build armv8
- ./deploy.sh -pr:h=./profiles/armv8
- cp ./build/deploy/lib/lib*.a ./tmp/tsdb/lib/aarch64/
- # Build default (x64)
- ./deploy.sh
- cp ./build/deploy/lib/lib*.a ./tmp/tsdb/lib/x86-64/
- # Package lf & hf versions
- mkdir -p ./release
- cd ./tmp
- # tar -czvf $base_dir/release/tsdb-v${cur_date}.tar.gz tsdb
- tar --exclude='tsdb/include/tsdb.h' --exclude='tsdb/demo/tsdbtest_lf.cpp' -czvf $base_dir/release/tsdb_hf-v${cur_date}.tar.gz tsdb
- tar --exclude='tsdb/include/tsdb_hf.h' --exclude='tsdb/demo/tsdbtest_hf.cpp' -czvf $base_dir/release/tsdb_lf-v${cur_date}.tar.gz tsdb
- cd $base_dir
- rm -rf ./tmp
- # Done!
- echo "✅ 打包成功"
|