From 0fc652a4b6abc07fc3effc5bf6e3a4b84bebf4b7 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Mon, 8 Jun 2020 15:06:24 +0800 Subject: [PATCH] [modify str len for version] --- packaging/release.sh | 12 ++++++------ src/util/src/version.c | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packaging/release.sh b/packaging/release.sh index a4562d21d2..7a585431a2 100755 --- a/packaging/release.sh +++ b/packaging/release.sh @@ -162,18 +162,18 @@ done # output the version info to the buildinfo file. build_time=$(date +"%F %R") -echo "char version[64] = \"${version}\";" > ${versioninfo} -echo "char compatible_version[64] = \"${compatible_version}\";" >> ${versioninfo} -echo "char gitinfo[128] = \"$(git rev-parse --verify HEAD)\";" >> ${versioninfo} +echo "char version[12] = \"${version}\";" > ${versioninfo} +echo "char compatible_version[12] = \"${compatible_version}\";" >> ${versioninfo} +echo "char gitinfo[48] = \"$(git rev-parse --verify HEAD)\";" >> ${versioninfo} if [ "$verMode" != "cluster" ]; then - echo "char gitinfoOfInternal[128] = \"\";" >> ${versioninfo} + echo "char gitinfoOfInternal[48] = \"\";" >> ${versioninfo} else enterprise_dir="${top_dir}/../enterprise" cd ${enterprise_dir} - echo "char gitinfoOfInternal[128] = \"$(git rev-parse --verify HEAD)\";" >> ${versioninfo} + echo "char gitinfoOfInternal[48] = \"$(git rev-parse --verify HEAD)\";" >> ${versioninfo} cd ${curr_dir} fi -echo "char buildinfo[512] = \"Built by ${USER} at ${build_time}\";" >> ${versioninfo} +echo "char buildinfo[64] = \"Built by ${USER} at ${build_time}\";" >> ${versioninfo} echo "" >> ${versioninfo} tmp_version=$(echo $version | tr -s "." "_") if [ "$verMode" == "cluster" ]; then diff --git a/src/util/src/version.c b/src/util/src/version.c index b6e10d8b7e..753cf71bc8 100644 --- a/src/util/src/version.c +++ b/src/util/src/version.c @@ -1,7 +1,7 @@ -char version[64] = "2.0.0.0"; -char compatible_version[64] = "2.0.0.0"; -char gitinfo[128] = "3264067e97300c84caa61ac909d548c9ca56de6b"; -char gitinfoOfInternal[128] = "da88f4a2474737d1f9c76adcf0ff7fd0975e7342"; -char buildinfo[512] = "Built by root at 2020-04-01 14:38"; +char version[TSDB_VERSION_LEN] = "2.0.0.0"; +char compatible_version[TSDB_VERSION_LEN] = "2.0.0.0"; +char gitinfo[48] = "3264067e97300c84caa61ac909d548c9ca56de6b"; +char gitinfoOfInternal[48] = "da88f4a2474737d1f9c76adcf0ff7fd0975e7342"; +char buildinfo[64] = "Built by root at 2020-04-01 14:38"; void libtaos_1_6_5_4_Linux_x64() {}; -- GitLab