Merge branch 'main' into merge/mainto3.0

This commit is contained in:
Simon Guan 2025-03-19 10:06:47 +08:00
commit e88965970c
4 changed files with 52 additions and 19 deletions

View File

@ -53,7 +53,6 @@ jobs:
run-tests-on-mac: run-tests-on-mac:
uses: taosdata/.github/.github/workflows/run-tests-on-macos.yml@main uses: taosdata/.github/.github/workflows/run-tests-on-macos.yml@main
if: ${{ github.event_name == 'pull_request' }}
with: with:
tdinternal: false tdinternal: false
specified_source_branch: ${{ github.event_name == 'pull_request' && 'unavailable' || inputs.specified_source_branch }} specified_source_branch: ${{ github.event_name == 'pull_request' && 'unavailable' || inputs.specified_source_branch }}
@ -62,7 +61,6 @@ jobs:
run-tests-on-windows: run-tests-on-windows:
uses: taosdata/.github/.github/workflows/run-tests-on-windows.yml@main uses: taosdata/.github/.github/workflows/run-tests-on-windows.yml@main
if: ${{ github.event_name == 'pull_request' }}
with: with:
tdinternal: false tdinternal: false
specified_source_branch: ${{ github.event_name == 'pull_request' && 'unavailable' || inputs.specified_source_branch }} specified_source_branch: ${{ github.event_name == 'pull_request' && 'unavailable' || inputs.specified_source_branch }}

View File

@ -8,7 +8,7 @@
</a> </a>
</p> </p>
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/taosdata/tdengine/taosd-ci-build.yml)](https://github.com/taosdata/TDengine/actions/workflows/taosd-ci-build.yml) [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/taosdata/tdengine/tdengine-test.yml)](https://github.com/taosdata/TDengine/actions/workflows/tdengine-test.yml)
[![Coverage Status](https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=3.0)](https://coveralls.io/github/taosdata/TDengine?branch=3.0) [![Coverage Status](https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=3.0)](https://coveralls.io/github/taosdata/TDengine?branch=3.0)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/taosdata/tdengine)](https://github.com/feici02/TDengine/commits/main/) [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/taosdata/tdengine)](https://github.com/feici02/TDengine/commits/main/)
<br /> <br />

View File

@ -162,9 +162,9 @@ remove_service_of() {
remove_tools_of() { remove_tools_of() {
_tool=$1 _tool=$1
kill_service_of ${_tool} kill_service_of ${_tool}
[ -e "${bin_link_dir}/${_tool}" ] && ${csudo}rm -rf ${bin_link_dir}/${_tool} || : [ -L "${bin_link_dir}/${_tool}" ] && ${csudo}rm -rf ${bin_link_dir}/${_tool} || :
[ -e "${installDir}/bin/${_tool}" ] && ${csudo}rm -rf ${installDir}/bin/${_tool} || : [ -e "${installDir}/bin/${_tool}" ] && ${csudo}rm -rf ${installDir}/bin/${_tool} || :
[ -e "${local_bin_link_dir}/${_tool}" ] && ${csudo}rm -rf ${local_bin_link_dir}/${_tool} || : [ -L "${local_bin_link_dir}/${_tool}" ] && ${csudo}rm -rf ${local_bin_link_dir}/${_tool} || :
} }
remove_bin() { remove_bin() {
@ -236,21 +236,56 @@ function remove_data_and_config() {
[ -d "${log_dir}" ] && ${csudo}rm -rf ${log_dir} [ -d "${log_dir}" ] && ${csudo}rm -rf ${log_dir}
} }
echo function usage() {
echo "Do you want to remove all the data, log and configuration files? [y/n]" echo -e "\nUsage: $(basename $0) [-e <yes|no>]"
read answer echo "-e: silent mode, specify whether to remove all the data, log and configuration files."
remove_flag=false echo " yes: remove the data, log, and configuration files."
if [ X$answer == X"y" ] || [ X$answer == X"Y" ]; then echo " no: don't remove the data, log, and configuration files."
confirmMsg="I confirm that I would like to delete all data, log and configuration files" }
echo "Please enter '${confirmMsg}' to continue"
# main
interactive_remove="yes"
remove_flag="false"
while getopts "e:h" opt; do
case $opt in
e)
interactive_remove="no"
if [ "$OPTARG" == "yes" ]; then
remove_flag="true"
echo "Remove all the data, log, and configuration files."
elif [ "$OPTARG" == "no" ]; then
remove_flag="false"
echo "Do not remove the data, log, and configuration files."
else
echo "Invalid option for -e: $OPTARG"
usage
exit 1
fi
;;
h | *)
usage
exit 1
;;
esac
done
if [ "$interactive_remove" == "yes" ]; then
echo -e "\nDo you want to remove all the data, log and configuration files? [y/n]"
read answer read answer
if [ X"$answer" == X"${confirmMsg}" ]; then if [ X$answer == X"y" ] || [ X$answer == X"Y" ]; then
remove_flag=true confirmMsg="I confirm that I would like to delete all data, log and configuration files"
else echo "Please enter '${confirmMsg}' to continue"
echo "answer doesn't match, skip this step" read answer
if [ X"$answer" == X"${confirmMsg}" ]; then
remove_flag="true"
else
echo "answer doesn't match, skip this step"
fi
fi fi
echo
fi fi
echo
if [ -e ${install_main_dir}/uninstall_${PREFIX}x.sh ]; then if [ -e ${install_main_dir}/uninstall_${PREFIX}x.sh ]; then
if [ X$remove_flag == X"true" ]; then if [ X$remove_flag == X"true" ]; then

View File

@ -57,7 +57,7 @@ function clean_bin() {
${csudo}rm -f ${bin_link_dir}/${dumpName2} || : ${csudo}rm -f ${bin_link_dir}/${dumpName2} || :
${csudo}rm -f ${bin_link_dir}/${uninstallScript2} || : ${csudo}rm -f ${bin_link_dir}/${uninstallScript2} || :
${csudo}rm -f ${bin_link_dir}/set_core || : ${csudo}rm -f ${bin_link_dir}/set_core || :
[ -f ${bin_link_dir}/${inspect_name} ] && ${csudo}rm -f ${bin_link_dir}/${inspect_name} || : [ -L ${bin_link_dir}/${inspect_name} ] && ${csudo}rm -f ${bin_link_dir}/${inspect_name} || :
if [ "$verMode" == "cluster" ] && [ "$clientName" != "$clientName2" ]; then if [ "$verMode" == "cluster" ] && [ "$clientName" != "$clientName2" ]; then
${csudo}rm -f ${bin_link_dir}/${clientName2} || : ${csudo}rm -f ${bin_link_dir}/${clientName2} || :
@ -65,7 +65,7 @@ function clean_bin() {
${csudo}rm -f ${bin_link_dir}/${benchmarkName2} || : ${csudo}rm -f ${bin_link_dir}/${benchmarkName2} || :
${csudo}rm -f ${bin_link_dir}/${dumpName2} || : ${csudo}rm -f ${bin_link_dir}/${dumpName2} || :
${csudo}rm -f ${bin_link_dir}/${uninstallScript2} || : ${csudo}rm -f ${bin_link_dir}/${uninstallScript2} || :
[ -f ${bin_link_dir}/${inspect_name} ] && ${csudo}rm -f ${bin_link_dir}/${inspect_name} || : [ -L ${bin_link_dir}/${inspect_name} ] && ${csudo}rm -f ${bin_link_dir}/${inspect_name} || :
fi fi
} }