未验证 提交 1bb9ac5a 编写于 作者: S slguan 提交者: GitHub

Merge pull request #1209 from taosdata/feature/lihui

[BASE-1513]
...@@ -36,7 +36,7 @@ ENDIF () ...@@ -36,7 +36,7 @@ ENDIF ()
IF (NOT DEFINED TD_CLUSTER) IF (NOT DEFINED TD_CLUSTER)
MESSAGE(STATUS "Build the Lite Version") MESSAGE(STATUS "Build the Lite Version")
SET(TD_CLUSTER FALSE) SET(TD_CLUSTER FALSE)
SET(TD_LITE TRUE) SET(TD_EDGE TRUE)
SET(TD_COMMUNITY_DIR ${PROJECT_SOURCE_DIR}) SET(TD_COMMUNITY_DIR ${PROJECT_SOURCE_DIR})
MESSAGE(STATUS "Community directory: " ${TD_COMMUNITY_DIR}) MESSAGE(STATUS "Community directory: " ${TD_COMMUNITY_DIR})
...@@ -53,12 +53,18 @@ IF (NOT DEFINED TD_CLUSTER) ...@@ -53,12 +53,18 @@ IF (NOT DEFINED TD_CLUSTER)
SET(TD_MIPS_32 FALSE) SET(TD_MIPS_32 FALSE)
SET(TD_DARWIN_64 FALSE) SET(TD_DARWIN_64 FALSE)
SET(TD_WINDOWS_64 FALSE) SET(TD_WINDOWS_64 FALSE)
SET(TD_PAGMODE_LITE FALSE)
IF (${PAGMODE} MATCHES "lite")
SET(TD_PAGMODE_LITE TRUE)
ENDIF ()
# if generate ARM version: # if generate ARM version:
# cmake -DCPUTYPE=aarch32 .. or cmake -DCPUTYPE=aarch64 # cmake -DCPUTYPE=aarch32 .. or cmake -DCPUTYPE=aarch64
IF (${CPUTYPE} MATCHES "aarch32") IF (${CPUTYPE} MATCHES "aarch32")
SET(TD_ARM TRUE) SET(TD_ARM TRUE)
SET(TD_ARM_32 TRUE) SET(TD_ARM_32 TRUE)
SET(TD_PAGMODE_LITE TRUE)
ADD_DEFINITIONS(-D_TD_ARM_) ADD_DEFINITIONS(-D_TD_ARM_)
ADD_DEFINITIONS(-D_TD_ARM_32_) ADD_DEFINITIONS(-D_TD_ARM_32_)
ELSEIF (${CPUTYPE} MATCHES "aarch64") ELSEIF (${CPUTYPE} MATCHES "aarch64")
......
...@@ -72,10 +72,10 @@ sed -i "2c$debver" ${pkg_dir}/DEBIAN/control ...@@ -72,10 +72,10 @@ sed -i "2c$debver" ${pkg_dir}/DEBIAN/control
if [ "$verMode" == "cluster" ]; then if [ "$verMode" == "cluster" ]; then
debname="TDengine-server-"${tdengine_ver}-${osType}-${cpuType} debname="TDengine-server-"${tdengine_ver}-${osType}-${cpuType}
elif [ "$verMode" == "lite" ]; then elif [ "$verMode" == "edge" ]; then
debname="TDengine-server"-${tdengine_ver}-${osType}-${cpuType} debname="TDengine-server"-${tdengine_ver}-${osType}-${cpuType}
else else
echo "unknow verMode, nor cluster or lite" echo "unknow verMode, nor cluster or edge"
exit 1 exit 1
fi fi
......
...@@ -5,15 +5,20 @@ ...@@ -5,15 +5,20 @@
set -e set -e
#set -x #set -x
# releash.sh -v [cluster | lite] -c [aarch32 | aarch64 | x64 | x86 | mips64 ...] -o [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | ...] -V [stable | beta] # releash.sh -v [cluster | edge]
# -c [aarch32 | aarch64 | x64 | x86 | mips64 ...]
# -o [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | ...]
# -V [stable | beta]
# -l [full | lite]
# set parameters by default value # set parameters by default value
verMode=lite # [cluster, lite] verMode=edge # [cluster, edge]
verType=stable # [stable, beta] verType=stable # [stable, beta]
cpuType=x64 # [aarch32 | aarch64 | x64 | x86 | mips64 ...] cpuType=x64 # [aarch32 | aarch64 | x64 | x86 | mips64 ...]
osType=Linux # [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | ...] osType=Linux # [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | ...]
pagMode=full # [full | lite]
while getopts "hv:V:c:o:" arg while getopts "hv:V:c:o:l:" arg
do do
case $arg in case $arg in
v) v)
...@@ -28,12 +33,16 @@ do ...@@ -28,12 +33,16 @@ do
#echo "cpuType=$OPTARG" #echo "cpuType=$OPTARG"
cpuType=$(echo $OPTARG) cpuType=$(echo $OPTARG)
;; ;;
l)
#echo "pagMode=$OPTARG"
pagMode=$(echo $OPTARG)
;;
o) o)
#echo "osType=$OPTARG" #echo "osType=$OPTARG"
osType=$(echo $OPTARG) osType=$(echo $OPTARG)
;; ;;
h) h)
echo "Usage: `basename $0` -v [cluster | lite] -c [aarch32 | aarch64 | x64 | x86 | mips64 ...] -o [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | ...] -V [stable | beta]" echo "Usage: `basename $0` -v [cluster | edge] -c [aarch32 | aarch64 | x64 | x86 | mips64 ...] -o [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | ...] -V [stable | beta] -l [full | lite]"
exit 0 exit 0
;; ;;
?) #unknow option ?) #unknow option
...@@ -43,7 +52,7 @@ do ...@@ -43,7 +52,7 @@ do
esac esac
done done
echo "verMode=${verMode} verType=${verType} cpuType=${cpuType} osType=${osType}" echo "verMode=${verMode} verType=${verType} cpuType=${cpuType} osType=${osType} pagMode=${pagMode}"
curr_dir=$(pwd) curr_dir=$(pwd)
...@@ -193,9 +202,9 @@ cd ${compile_dir} ...@@ -193,9 +202,9 @@ cd ${compile_dir}
# check support cpu type # check support cpu type
if [[ "$cpuType" == "x64" ]] || [[ "$cpuType" == "aarch64" ]] || [[ "$cpuType" == "aarch32" ]] || [[ "$cpuType" == "mips64" ]] ; then if [[ "$cpuType" == "x64" ]] || [[ "$cpuType" == "aarch64" ]] || [[ "$cpuType" == "aarch32" ]] || [[ "$cpuType" == "mips64" ]] ; then
if [ "$verMode" != "cluster" ]; then if [ "$verMode" != "cluster" ]; then
cmake ../ -DCPUTYPE=${cpuType} cmake ../ -DCPUTYPE=${cpuType} -DPAGMODE=${pagMode}
else else
cmake ../../ -DCPUTYPE=${cpuType} cmake ../../ -DCPUTYPE=${cpuType}
fi fi
else else
echo "input cpuType=${cpuType} error!!!" echo "input cpuType=${cpuType} error!!!"
...@@ -235,8 +244,8 @@ if [ "$osType" != "Darwin" ]; then ...@@ -235,8 +244,8 @@ if [ "$osType" != "Darwin" ]; then
echo "====do tar.gz package for all systems====" echo "====do tar.gz package for all systems===="
cd ${script_dir}/tools cd ${script_dir}/tools
${csudo} ./makepkg.sh ${compile_dir} ${version} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${csudo} ./makepkg.sh ${compile_dir} ${version} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode}
${csudo} ./makeclient.sh ${compile_dir} ${version} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${csudo} ./makeclient.sh ${compile_dir} ${version} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode}
else else
cd ${script_dir}/tools cd ${script_dir}/tools
./makeclient.sh ${compile_dir} ${version} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ./makeclient.sh ${compile_dir} ${version} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType}
......
...@@ -65,10 +65,10 @@ cp_rpm_package ${pkg_dir}/RPMS ...@@ -65,10 +65,10 @@ cp_rpm_package ${pkg_dir}/RPMS
if [ "$verMode" == "cluster" ]; then if [ "$verMode" == "cluster" ]; then
rpmname="TDengine-server-"${tdengine_ver}-${osType}-${cpuType} rpmname="TDengine-server-"${tdengine_ver}-${osType}-${cpuType}
elif [ "$verMode" == "lite" ]; then elif [ "$verMode" == "edge" ]; then
rpmname="TDengine-server"-${tdengine_ver}-${osType}-${cpuType} rpmname="TDengine-server"-${tdengine_ver}-${osType}-${cpuType}
else else
echo "unknow verMode, nor cluster or lite" echo "unknow verMode, nor cluster or edge"
exit 1 exit 1
fi fi
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
set -e set -e
#set -x #set -x
verMode=lite verMode=edge
pagMode=full
# -----------------------Variables definition--------------------- # -----------------------Variables definition---------------------
script_dir=$(dirname $(readlink -f "$0")) script_dir=$(dirname $(readlink -f "$0"))
...@@ -479,7 +480,9 @@ function update_TDengine() { ...@@ -479,7 +480,9 @@ function update_TDengine() {
install_log install_log
install_header install_header
install_lib install_lib
install_connector if [ "$pagMode" != "lite" ]; then
install_connector
fi
install_examples install_examples
if [ -z $1 ]; then if [ -z $1 ]; then
install_bin install_bin
...@@ -554,7 +557,9 @@ function install_TDengine() { ...@@ -554,7 +557,9 @@ function install_TDengine() {
install_log install_log
install_header install_header
install_lib install_lib
install_connector if [ "$pagMode" != "lite" ]; then
install_connector
fi
install_examples install_examples
if [ -z $1 ]; then # install service and client if [ -z $1 ]; then # install service and client
......
...@@ -9,6 +9,7 @@ set -e ...@@ -9,6 +9,7 @@ set -e
# -----------------------Variables definition--------------------- # -----------------------Variables definition---------------------
osType=Linux osType=Linux
pagMode=full
if [ "$osType" != "Darwin" ]; then if [ "$osType" != "Darwin" ]; then
script_dir=$(dirname $(readlink -f "$0")) script_dir=$(dirname $(readlink -f "$0"))
...@@ -180,7 +181,9 @@ function update_TDengine() { ...@@ -180,7 +181,9 @@ function update_TDengine() {
install_log install_log
install_header install_header
install_lib install_lib
install_connector if [ "$pagMode" != "lite" ]; then
install_connector
fi
install_examples install_examples
install_bin install_bin
install_config install_config
...@@ -205,7 +208,9 @@ function install_TDengine() { ...@@ -205,7 +208,9 @@ function install_TDengine() {
install_log install_log
install_header install_header
install_lib install_lib
install_connector if [ "$pagMode" != "lite" ]; then
install_connector
fi
install_examples install_examples
install_bin install_bin
install_config install_config
......
...@@ -12,6 +12,7 @@ cpuType=$4 ...@@ -12,6 +12,7 @@ cpuType=$4
osType=$5 osType=$5
verMode=$6 verMode=$6
verType=$7 verType=$7
pagMode=$8
if [ "$osType" != "Darwin" ]; then if [ "$osType" != "Darwin" ]; then
script_dir="$(dirname $(readlink -f $0))" script_dir="$(dirname $(readlink -f $0))"
...@@ -39,11 +40,17 @@ fi ...@@ -39,11 +40,17 @@ fi
# Directories and files. # Directories and files.
if [ "$osType" != "Darwin" ]; then if [ "$osType" != "Darwin" ]; then
if [ "$pagMode" == "lite" ]; then
strip ${build_dir}/bin/taosd
strip ${build_dir}/bin/taos
bin_files="${build_dir}/bin/taos ${script_dir}/remove_client.sh"
else
bin_files="${build_dir}/bin/taos ${build_dir}/bin/taosdump ${script_dir}/remove_client.sh" bin_files="${build_dir}/bin/taos ${build_dir}/bin/taosdump ${script_dir}/remove_client.sh"
lib_files="${build_dir}/lib/libtaos.so.${version}" fi
lib_files="${build_dir}/lib/libtaos.so.${version}"
else else
bin_files="${build_dir}/bin/taos ${script_dir}/remove_client.sh" bin_files="${build_dir}/bin/taos ${script_dir}/remove_client.sh"
lib_files="${build_dir}/lib/libtaos.${version}.dylib" lib_files="${build_dir}/lib/libtaos.${version}.dylib"
fi fi
header_files="${code_dir}/inc/taos.h ${code_dir}/inc/taoserror.h" header_files="${code_dir}/inc/taos.h ${code_dir}/inc/taoserror.h"
...@@ -74,18 +81,23 @@ if [ "$osType" == "Darwin" ]; then ...@@ -74,18 +81,23 @@ if [ "$osType" == "Darwin" ]; then
sed 's/osType=Linux/osType=Darwin/g' ${install_dir}/install_client.sh >> install_client_temp.sh sed 's/osType=Linux/osType=Darwin/g' ${install_dir}/install_client.sh >> install_client_temp.sh
mv install_client_temp.sh ${install_dir}/install_client.sh mv install_client_temp.sh ${install_dir}/install_client.sh
fi fi
if [ "$pagMode" == "lite" ]; then
sed 's/pagMode=full/pagMode=lite/g' ${install_dir}/install_client.sh >> install_client_temp.sh
mv install_client_temp.sh ${install_dir}/install_client.sh
fi
chmod a+x ${install_dir}/install_client.sh chmod a+x ${install_dir}/install_client.sh
# Copy example code # Copy example code
mkdir -p ${install_dir}/examples mkdir -p ${install_dir}/examples
examples_dir="${top_dir}/tests/examples" examples_dir="${top_dir}/tests/examples"
cp -r ${examples_dir}/c ${install_dir}/examples cp -r ${examples_dir}/c ${install_dir}/examples
cp -r ${examples_dir}/JDBC ${install_dir}/examples if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
cp -r ${examples_dir}/matlab ${install_dir}/examples cp -r ${examples_dir}/JDBC ${install_dir}/examples
cp -r ${examples_dir}/python ${install_dir}/examples cp -r ${examples_dir}/matlab ${install_dir}/examples
cp -r ${examples_dir}/R ${install_dir}/examples cp -r ${examples_dir}/python ${install_dir}/examples
cp -r ${examples_dir}/go ${install_dir}/examples cp -r ${examples_dir}/R ${install_dir}/examples
cp -r ${examples_dir}/go ${install_dir}/examples
fi
# Copy driver # Copy driver
mkdir -p ${install_dir}/driver mkdir -p ${install_dir}/driver
cp ${lib_files} ${install_dir}/driver cp ${lib_files} ${install_dir}/driver
...@@ -94,13 +106,14 @@ cp ${lib_files} ${install_dir}/driver ...@@ -94,13 +106,14 @@ cp ${lib_files} ${install_dir}/driver
connector_dir="${code_dir}/connector" connector_dir="${code_dir}/connector"
mkdir -p ${install_dir}/connector mkdir -p ${install_dir}/connector
if [ "$osType" != "Darwin" ]; then if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
if [ "$osType" != "Darwin" ]; then
cp ${build_dir}/lib/*.jar ${install_dir}/connector cp ${build_dir}/lib/*.jar ${install_dir}/connector
fi
cp -r ${connector_dir}/grafana ${install_dir}/connector/
cp -r ${connector_dir}/python ${install_dir}/connector/
cp -r ${connector_dir}/go ${install_dir}/connector
fi fi
cp -r ${connector_dir}/grafana ${install_dir}/connector/
cp -r ${connector_dir}/python ${install_dir}/connector/
cp -r ${connector_dir}/go ${install_dir}/connector
# Copy release note # Copy release note
# cp ${script_dir}/release_note ${install_dir} # cp ${script_dir}/release_note ${install_dir}
...@@ -110,13 +123,17 @@ cd ${release_dir} ...@@ -110,13 +123,17 @@ cd ${release_dir}
if [ "$verMode" == "cluster" ]; then if [ "$verMode" == "cluster" ]; then
pkg_name=${install_dir}-${version}-${osType}-${cpuType} pkg_name=${install_dir}-${version}-${osType}-${cpuType}
elif [ "$verMode" == "lite" ]; then elif [ "$verMode" == "edge" ]; then
pkg_name=${install_dir}-${version}-${osType}-${cpuType} pkg_name=${install_dir}-${version}-${osType}-${cpuType}
else else
echo "unknow verMode, nor cluster or lite" echo "unknow verMode, nor cluster or edge"
exit 1 exit 1
fi fi
if [ "$pagMode" == "lite" ]; then
pkg_name=${pkg_name}-Lite
fi
if [ "$verType" == "beta" ]; then if [ "$verType" == "beta" ]; then
pkg_name=${pkg_name}-${verType} pkg_name=${pkg_name}-${verType}
elif [ "$verType" == "stable" ]; then elif [ "$verType" == "stable" ]; then
......
...@@ -13,6 +13,7 @@ cpuType=$4 ...@@ -13,6 +13,7 @@ cpuType=$4
osType=$5 osType=$5
verMode=$6 verMode=$6
verType=$7 verType=$7
pagMode=$8
script_dir="$(dirname $(readlink -f $0))" script_dir="$(dirname $(readlink -f $0))"
top_dir="$(readlink -f ${script_dir}/../..)" top_dir="$(readlink -f ${script_dir}/../..)"
...@@ -30,7 +31,14 @@ else ...@@ -30,7 +31,14 @@ else
fi fi
# Directories and files. # Directories and files.
bin_files="${build_dir}/bin/taosd ${build_dir}/bin/taos ${build_dir}/bin/taosdemo ${build_dir}/bin/taosdump ${script_dir}/remove.sh" if [ "$pagMode" == "lite" ]; then
strip ${build_dir}/bin/taosd
strip ${build_dir}/bin/taos
bin_files="${build_dir}/bin/taosd ${build_dir}/bin/taos ${script_dir}/remove.sh"
else
bin_files="${build_dir}/bin/taosd ${build_dir}/bin/taos ${build_dir}/bin/taosdemo ${build_dir}/bin/taosdump ${script_dir}/remove.sh"
fi
lib_files="${build_dir}/lib/libtaos.so.${version}" lib_files="${build_dir}/lib/libtaos.so.${version}"
header_files="${code_dir}/inc/taos.h ${code_dir}/inc/taoserror.h" header_files="${code_dir}/inc/taos.h ${code_dir}/inc/taoserror.h"
cfg_dir="${top_dir}/packaging/cfg" cfg_dir="${top_dir}/packaging/cfg"
...@@ -56,6 +64,9 @@ mkdir -p ${install_dir}/init.d && cp ${init_file_deb} ${install_dir}/init.d/taos ...@@ -56,6 +64,9 @@ mkdir -p ${install_dir}/init.d && cp ${init_file_deb} ${install_dir}/init.d/taos
mkdir -p ${install_dir}/init.d && cp ${init_file_rpm} ${install_dir}/init.d/taosd.rpm mkdir -p ${install_dir}/init.d && cp ${init_file_rpm} ${install_dir}/init.d/taosd.rpm
if [ "$verMode" == "cluster" ]; then if [ "$verMode" == "cluster" ]; then
sed 's/verMode=edge/verMode=cluster/g' ${install_dir}/bin/remove.sh >> remove_temp.sh
mv remove_temp.sh ${install_dir}/bin/remove.sh
mkdir -p ${install_dir}/nginxd && cp -r ${nginx_dir}/* ${install_dir}/nginxd mkdir -p ${install_dir}/nginxd && cp -r ${nginx_dir}/* ${install_dir}/nginxd
cp ${nginx_dir}/png/taos.png ${install_dir}/nginxd/admin/images/taos.png cp ${nginx_dir}/png/taos.png ${install_dir}/nginxd/admin/images/taos.png
rm -rf ${install_dir}/nginxd/png rm -rf ${install_dir}/nginxd/png
...@@ -70,25 +81,35 @@ fi ...@@ -70,25 +81,35 @@ fi
cd ${install_dir} cd ${install_dir}
tar -zcv -f taos.tar.gz * --remove-files || : tar -zcv -f taos.tar.gz * --remove-files || :
exitcode=$?
if [ "$exitcode" != "0" ]; then
echo "tar taos.tar.gz error !!!"
exit $exitcode
fi
cd ${curr_dir} cd ${curr_dir}
cp ${install_files} ${install_dir} cp ${install_files} ${install_dir}
if [ "$verMode" == "cluster" ]; then if [ "$verMode" == "cluster" ]; then
sed 's/verMode=lite/verMode=cluster/g' ${install_dir}/install.sh >> install_temp.sh sed 's/verMode=edge/verMode=cluster/g' ${install_dir}/install.sh >> install_temp.sh
mv install_temp.sh ${install_dir}/install.sh mv install_temp.sh ${install_dir}/install.sh
fi
if [ "$pagMode" == "lite" ]; then
sed 's/pagMode=full/pagMode=lite/g' ${install_dir}/install.sh >> install_temp.sh
mv install_temp.sh ${install_dir}/install.sh
fi fi
chmod a+x ${install_dir}/install.sh chmod a+x ${install_dir}/install.sh
# Copy example code # Copy example code
mkdir -p ${install_dir}/examples mkdir -p ${install_dir}/examples
examples_dir="${top_dir}/tests/examples" examples_dir="${top_dir}/tests/examples"
cp -r ${examples_dir}/c ${install_dir}/examples cp -r ${examples_dir}/c ${install_dir}/examples
cp -r ${examples_dir}/JDBC ${install_dir}/examples if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
cp -r ${examples_dir}/matlab ${install_dir}/examples cp -r ${examples_dir}/JDBC ${install_dir}/examples
cp -r ${examples_dir}/python ${install_dir}/examples cp -r ${examples_dir}/matlab ${install_dir}/examples
cp -r ${examples_dir}/R ${install_dir}/examples cp -r ${examples_dir}/python ${install_dir}/examples
cp -r ${examples_dir}/go ${install_dir}/examples cp -r ${examples_dir}/R ${install_dir}/examples
cp -r ${examples_dir}/go ${install_dir}/examples
fi
# Copy driver # Copy driver
mkdir -p ${install_dir}/driver mkdir -p ${install_dir}/driver
cp ${lib_files} ${install_dir}/driver cp ${lib_files} ${install_dir}/driver
...@@ -96,11 +117,12 @@ cp ${lib_files} ${install_dir}/driver ...@@ -96,11 +117,12 @@ cp ${lib_files} ${install_dir}/driver
# Copy connector # Copy connector
connector_dir="${code_dir}/connector" connector_dir="${code_dir}/connector"
mkdir -p ${install_dir}/connector mkdir -p ${install_dir}/connector
cp ${build_dir}/lib/*.jar ${install_dir}/connector if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
cp -r ${connector_dir}/grafana ${install_dir}/connector/ cp ${build_dir}/lib/*.jar ${install_dir}/connector
cp -r ${connector_dir}/python ${install_dir}/connector/ cp -r ${connector_dir}/grafana ${install_dir}/connector/
cp -r ${connector_dir}/go ${install_dir}/connector cp -r ${connector_dir}/python ${install_dir}/connector/
cp -r ${connector_dir}/go ${install_dir}/connector
fi
# Copy release note # Copy release note
# cp ${script_dir}/release_note ${install_dir} # cp ${script_dir}/release_note ${install_dir}
...@@ -110,13 +132,17 @@ cd ${release_dir} ...@@ -110,13 +132,17 @@ cd ${release_dir}
if [ "$verMode" == "cluster" ]; then if [ "$verMode" == "cluster" ]; then
pkg_name=${install_dir}-${version}-${osType}-${cpuType} pkg_name=${install_dir}-${version}-${osType}-${cpuType}
elif [ "$verMode" == "lite" ]; then elif [ "$verMode" == "edge" ]; then
pkg_name=${install_dir}-${version}-${osType}-${cpuType} pkg_name=${install_dir}-${version}-${osType}-${cpuType}
else else
echo "unknow verMode, nor cluster or lite" echo "unknow verMode, nor cluster or edge"
exit 1 exit 1
fi fi
if [ "$pagMode" == "lite" ]; then
pkg_name=${pkg_name}-Lite
fi
if [ "$verType" == "beta" ]; then if [ "$verType" == "beta" ]; then
pkg_name=${pkg_name}-${verType} pkg_name=${pkg_name}-${verType}
elif [ "$verType" == "stable" ]; then elif [ "$verType" == "stable" ]; then
...@@ -127,5 +153,10 @@ else ...@@ -127,5 +153,10 @@ else
fi fi
tar -zcv -f "$(basename ${pkg_name}).tar.gz" $(basename ${install_dir}) --remove-files || : tar -zcv -f "$(basename ${pkg_name}).tar.gz" $(basename ${install_dir}) --remove-files || :
exitcode=$?
if [ "$exitcode" != "0" ]; then
echo "tar ${pkg_name}.tar.gz error !!!"
exit $exitcode
fi
cd ${curr_dir} cd ${curr_dir}
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
set -e set -e
#set -x #set -x
verMode=lite verMode=edge
RED='\033[0;31m' RED='\033[0;31m'
GREEN='\033[1;32m' GREEN='\033[1;32m'
......
...@@ -11,7 +11,13 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM)) ...@@ -11,7 +11,13 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
LIST(REMOVE_ITEM SRC ./src/shellWindows.c) LIST(REMOVE_ITEM SRC ./src/shellWindows.c)
LIST(REMOVE_ITEM SRC ./src/shellDarwin.c) LIST(REMOVE_ITEM SRC ./src/shellDarwin.c)
ADD_EXECUTABLE(shell ${SRC}) ADD_EXECUTABLE(shell ${SRC})
TARGET_LINK_LIBRARIES(shell taos_static)
IF (TD_PAGMODE_LITE)
TARGET_LINK_LIBRARIES(shell taos)
ELSE ()
TARGET_LINK_LIBRARIES(shell taos_static)
ENDIF ()
SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME taos) SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME taos)
ELSEIF (TD_WINDOWS_64) ELSEIF (TD_WINDOWS_64)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/pthread) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/pthread)
......
...@@ -9,5 +9,11 @@ INCLUDE_DIRECTORIES(inc) ...@@ -9,5 +9,11 @@ INCLUDE_DIRECTORIES(inc)
IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM)) IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
AUX_SOURCE_DIRECTORY(. SRC) AUX_SOURCE_DIRECTORY(. SRC)
ADD_EXECUTABLE(taosdemo ${SRC}) ADD_EXECUTABLE(taosdemo ${SRC})
TARGET_LINK_LIBRARIES(taosdemo taos_static)
IF (TD_PAGMODE_LITE)
TARGET_LINK_LIBRARIES(taosdemo taos)
ELSE ()
TARGET_LINK_LIBRARIES(taosdemo taos_static)
ENDIF ()
ENDIF () ENDIF ()
...@@ -9,5 +9,12 @@ INCLUDE_DIRECTORIES(inc) ...@@ -9,5 +9,12 @@ INCLUDE_DIRECTORIES(inc)
IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM)) IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
AUX_SOURCE_DIRECTORY(. SRC) AUX_SOURCE_DIRECTORY(. SRC)
ADD_EXECUTABLE(taosdump ${SRC}) ADD_EXECUTABLE(taosdump ${SRC})
TARGET_LINK_LIBRARIES(taosdump taos_static)
IF (TD_PAGMODE_LITE)
TARGET_LINK_LIBRARIES(taosdump taos)
ELSE ()
TARGET_LINK_LIBRARIES(taosdump taos_static)
ENDIF ()
ENDIF () ENDIF ()
...@@ -3,6 +3,6 @@ PROJECT(TDengine) ...@@ -3,6 +3,6 @@ PROJECT(TDengine)
ADD_SUBDIRECTORY(detail) ADD_SUBDIRECTORY(detail)
IF (TD_LITE) IF (TD_EDGE)
ADD_SUBDIRECTORY(lite) ADD_SUBDIRECTORY(lite)
ENDIF () ENDIF ()
\ No newline at end of file
...@@ -16,10 +16,14 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM)) ...@@ -16,10 +16,14 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
ADD_EXECUTABLE(taosd ${SRC}) ADD_EXECUTABLE(taosd ${SRC})
TARGET_LINK_LIBRARIES(taosd taos_static trpc tutil sdb monitor pthread http) IF (TD_PAGMODE_LITE)
TARGET_LINK_LIBRARIES(taosd taos trpc tutil sdb monitor pthread http)
ELSE ()
TARGET_LINK_LIBRARIES(taosd taos_static trpc tutil sdb monitor pthread http)
ENDIF ()
IF (TD_LITE) IF (TD_EDGE)
TARGET_LINK_LIBRARIES(taosd taosd_lite) TARGET_LINK_LIBRARIES(taosd taosd_edge)
ELSE () ELSE ()
TARGET_LINK_LIBRARIES(taosd taosd_cluster) TARGET_LINK_LIBRARIES(taosd taosd_cluster)
ENDIF () ENDIF ()
......
...@@ -13,5 +13,5 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM)) ...@@ -13,5 +13,5 @@ IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
INCLUDE_DIRECTORIES(inc) INCLUDE_DIRECTORIES(inc)
AUX_SOURCE_DIRECTORY(./src SRC) AUX_SOURCE_DIRECTORY(./src SRC)
ADD_LIBRARY(taosd_lite ${SRC}) ADD_LIBRARY(taosd_edge ${SRC})
ENDIF () ENDIF ()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册