fix(gpt): remove cache files before packaging tdgpt.

This commit is contained in:
Haojun Liao 2025-03-11 10:14:41 +08:00
parent 2f711467ee
commit 07f9c01d53
1 changed files with 5 additions and 6 deletions

View File

@ -9,7 +9,7 @@ compile_dir=$1
version="1.0.1"
osType=
pagMode=
productName="TDengine-enterprise-anode"
productName="TDengine-community-anode"
script_dir="$(dirname $(readlink -f $0))"
top_dir="$(readlink -f ${script_dir}/..)"
@ -45,18 +45,17 @@ fi
# python files
mkdir -p ${install_dir}/bin && mkdir -p ${install_dir}/lib
# remove cache files generated by Python interpreter
TARGET_PATTERN="__pycache__"
find "${top_dir}/taosanalytics/" -type d -name "$TARGET_PATTERN" -exec rm -rf {} +
# script to control start/stop/uninstall process
rm -r ${top_dir}/taosanalytics/*.pyc || :
cp -r ${top_dir}/taosanalytics/ ${install_dir}/lib/ && chmod a+x ${install_dir}/lib/ || :
cp -r ${top_dir}/script/st*.sh ${install_dir}/bin/ && chmod a+x ${install_dir}/bin/* || :
cp -r ${top_dir}/script/uninstall.sh ${install_dir}/bin/ && chmod a+x ${install_dir}/bin/* || :
cd ${install_dir}
#if [ "$osType" != "Darwin" ]; then
# tar -zcv -f ${tarName} ./bin/* || :
# rm -rf ${install_dir}/bin || :
#else
tar -zcv -f ${tarName} ./lib/* || :
if [ ! -z "${install_dir}" ]; then