提交 d468cc5e 编写于 作者: L lihui

[TBASE-1271]

上级 d15d7688
......@@ -63,7 +63,7 @@ debver="Version: "$tdengine_ver
sed -i "2c$debver" ${pkg_dir}/DEBIAN/control
#get taos version, then set deb name
debname="tdengine-"${tdengine_ver}".deb"
debname="TDengine-"${tdengine_ver}".deb"
# make deb package
dpkg -b ${pkg_dir} $debname
......
......@@ -2,6 +2,9 @@
#
# Generate rpm package for centos
#set -e
#set -x
#curr_dir=$(pwd)
compile_dir=$1
output_dir=$2
......@@ -24,8 +27,25 @@ if command -v sudo > /dev/null; then
csudo="sudo"
fi
function cp_rpm_package() {
local cur_dir
cd $1
cur_dir=$(pwd)
for dirlist in $(ls ${cur_dir}); do
if test -d ${dirlist}; then
cd ${dirlist}
cp_rpm_package ${cur_dir}/${dirlist}
cd ..
fi
if test -e ${dirlist}; then
cp ${cur_dir}/${dirlist} ${output_dir}/TDengine-${tdengine_ver}.rpm
fi
done
}
if [ -d ${pkg_dir} ]; then
${csudo} rm -rf ${pkg_dir}
${csudo} rm -rf ${pkg_dir}
fi
${csudo} mkdir -p ${pkg_dir}
cd ${pkg_dir}
......@@ -35,7 +55,8 @@ ${csudo} mkdir -p BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
${csudo} rpmbuild --define="_version ${tdengine_ver}" --define="_topdir ${pkg_dir}" --define="_compiledir ${compile_dir}" -bb ${spec_file}
# copy rpm package to output_dir, then clean temp dir
#echo "rmpbuild end, cur_dir: $(pwd) "
${csudo} cp -rf RPMS/* ${output_dir}
#${csudo} cp -rf RPMS/* ${output_dir}
cp_rpm_package ${pkg_dir}/RPMS
cd ..
${csudo} rm -rf ${pkg_dir}
......@@ -2,7 +2,7 @@
%define cfg_install_dir /etc/taos
%define __strip /bin/true
Name: tdengine
Name: TDengine
Version: %{_version}
Release: 3%{?dist}
Summary: tdengine from taosdata
......
......@@ -19,8 +19,8 @@ code_dir="${top_dir}/src"
release_dir="${top_dir}/release"
community_dir="${script_dir}/../../../community/src"
package_name='linux'
install_dir="${release_dir}/taos-client-${version}-${package_name}-$(echo ${build_time}| tr ': ' -)"
#package_name='linux'
install_dir="${release_dir}/TDengine-client-${version}"
# Directories and files.
bin_files="${build_dir}/bin/taos ${build_dir}/bin/taosdump ${script_dir}/remove_client.sh"
......
......@@ -16,8 +16,8 @@ build_dir="${compile_dir}/build"
code_dir="${top_dir}/src"
release_dir="${top_dir}/release"
package_name='linux'
install_dir="${release_dir}/taos-${version}-${package_name}-$(echo ${build_time}| tr ': ' -)"
#package_name='linux'
install_dir="${release_dir}/TDengine-${version}"
# 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"
......
......@@ -29,9 +29,19 @@
#elif defined(DARWIN)
char CLIENT_VERSION[] = "Welcome to the TDengine shell from mac, client version:%s ";
#else
char CLIENT_VERSION[] = "Welcome to the TDengine shell from linux, client version:%s ";
#ifdef CLUSTER
char CLIENT_VERSION[] = "Welcome to the TDengine shell from linux, enterprise client version:%s ";
#else
char CLIENT_VERSION[] = "Welcome to the TDengine shell from linux, community client version:%s ";
#endif
#endif
char SERVER_VERSION[] = "server version:%s\nCopyright (c) 2017 by TAOS Data, Inc. All rights reserved.\n\n";
#ifdef CLUSTER
char SERVER_VERSION[] = "enterprise server version:%s\nCopyright (c) 2017 by TAOS Data, Inc. All rights reserved.\n\n";
#else
char SERVER_VERSION[] = "community server version:%s\nCopyright (c) 2017 by TAOS Data, Inc. All rights reserved.\n\n";
#endif
char PROMPT_HEADER[] = "taos> ";
char CONTINUE_PROMPT[] = " -> ";
int prompt_size = 6;
......
......@@ -105,6 +105,15 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
static struct argp argp = {options, parse_opt, args_doc, doc};
void shellParseArgument(int argc, char *argv[], struct arguments *arguments) {
char verType[32] = {0};
#ifdef CLUSTER
sprintf(verType, "enterprise version: %s\n", version);
#else
sprintf(verType, "community version: %s\n", version);
#endif
argp_program_version = verType;
argp_parse(&argp, argc, argv, 0, 0, arguments);
if (arguments->abort) {
error(10, 0, "ABORTED");
......
......@@ -55,7 +55,12 @@ int main(int argc, char *argv[]) {
exit(EXIT_FAILURE);
}
} else if (strcmp(argv[i], "-V") == 0) {
printf("version: %s compatible_version: %s\n", version, compatible_version);
#ifdef CLUSTER
printf("enterprise version: %s compatible_version: %s\n", version, compatible_version);
#else
printf("community version: %s compatible_version: %s\n", version, compatible_version);
#endif
printf("gitinfo: %s\n", gitinfo);
printf("buildinfo: %s\n", buildinfo);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册