Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a009cbdc
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a009cbdc
编写于
12月 31, 2021
作者:
Z
zyyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change
上级
ce531410
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
228 addition
and
221 deletion
+228
-221
packaging/release.sh
packaging/release.sh
+111
-118
packaging/tools/makepkg.sh
packaging/tools/makepkg.sh
+117
-103
未找到文件。
packaging/release.sh
浏览文件 @
a009cbdc
...
...
@@ -34,12 +34,11 @@ verNumber=""
verNumberComp
=
"1.0.0.0"
httpdBuild
=
false
while
getopts
"hv:V:c:o:l:s:d:a:n:m:H:"
arg
do
while
getopts
"hv:V:c:o:l:s:d:a:n:m:H:"
arg
;
do
case
$arg
in
v
)
#echo "verMode=$OPTARG"
verMode
=
$(
echo
$OPTARG
)
verMode
=
$(
echo
$OPTARG
)
;;
V
)
#echo "verType=$OPTARG"
...
...
@@ -82,7 +81,7 @@ do
httpdBuild
=
$(
echo
$OPTARG
)
;;
h
)
echo
"Usage:
`
basename
$0
`
-v [cluster | edge] "
echo
"Usage:
$(
basename
$0
)
-v [cluster | edge] "
echo
" -c [aarch32 | aarch64 | x64 | x86 | mips64 ...] "
echo
" -o [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | Ningsi60 | Ningsi80 |...] "
echo
" -V [stable | beta] "
...
...
@@ -110,7 +109,7 @@ if [ "$osType" != "Darwin" ]; then
script_dir
=
"
$(
dirname
$(
readlink
-f
$0
))
"
top_dir
=
"
$(
readlink
-f
${
script_dir
}
/..
)
"
else
script_dir
=
`
dirname
$0
`
script_dir
=
$(
dirname
$0
)
cd
${
script_dir
}
script_dir
=
"
$(
pwd
)
"
top_dir
=
${
script_dir
}
/..
...
...
@@ -131,7 +130,7 @@ function is_valid_version() {
return
1
}
function
vercomp
()
{
function
vercomp
()
{
if
[[
$1
==
$2
]]
;
then
echo
0
exit
0
...
...
@@ -141,11 +140,11 @@ function vercomp () {
local
i
ver1
=(
$1
)
ver2
=(
$2
)
# fill empty fields in ver1 with zeros
for
((
i
=
${#
ver1
[@]
}
;
i<
${#
ver2
[@]
}
;
i++
))
;
do
for
((
i
=
${#
ver1
[@]
}
;
i <
${#
ver2
[@]
}
;
i++
))
;
do
ver1[i]
=
0
done
for
((
i
=
0
;
i<
${#
ver1
[@]
}
;
i++
))
;
do
for
((
i
=
0
;
i <
${#
ver1
[@]
}
;
i++
))
;
do
if
[[
-z
${
ver2
[i]
}
]]
;
then
# fill empty fields in ver2 with zeros
ver2[i]
=
0
...
...
@@ -163,7 +162,7 @@ function vercomp () {
}
# 1. check version information
if
(
(
!
is_valid_version
$verNumber
)
||
(
!
is_valid_version
$verNumberComp
)
||
[[
"
$(
vercomp
$verNumber
$verNumberComp
)
"
==
'2'
]]
)
;
then
if
(
(
!
is_valid_version
$verNumber
)
||
(!
is_valid_version
$verNumberComp
)
||
[[
"
$(
vercomp
$verNumber
$verNumberComp
)
"
==
'2'
]]
)
;
then
echo
"please enter correct version"
exit
0
fi
...
...
@@ -225,7 +224,7 @@ else
fi
# 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
# community-version compile
cmake ../
-DCPUTYPE
=
${
cpuType
}
-DOSTYPE
=
${
osType
}
-DSOMODE
=
${
soMode
}
-DDBNAME
=
${
dbName
}
-DVERTYPE
=
${
verType
}
-DVERDATE
=
"
${
build_time
}
"
-DGITINFO
=
${
gitinfo
}
-DGITINFOI
=
${
gitinfoOfInternal
}
-DVERNUMBER
=
${
verNumber
}
-DVERCOMPATIBLE
=
${
verNumberComp
}
-DPAGMODE
=
${
pagMode
}
-DBUILD_HTTP
=
${
BUILD_HTTP
}
-DBUILD_TOOLS
=
${
BUILD_TOOLS
}
${
allocator_macro
}
...
...
@@ -240,7 +239,7 @@ else
exit
1
fi
CORES
=
`
grep
-c
^processor /proc/cpuinfo
`
CORES
=
$(
grep
-c
^processor /proc/cpuinfo
)
if
[[
"
$allocator
"
==
"jemalloc"
]]
;
then
# jemalloc need compile first, so disable parallel build
...
...
@@ -271,7 +270,7 @@ if [ "$osType" != "Darwin" ]; then
cd
${
top_dir
}
/src/kit/taos-tools/packaging/deb
[
-z
"
$taos_tools_ver
"
]
&&
taos_tools_ver
=
"0.1.0"
taos_tools_ver
=
$(
git describe
--tags
|sed
-e
's/ver-//g'
|
awk
-F
'-'
'{print $1}'
)
taos_tools_ver
=
$(
git describe
--tags
|
sed
-e
's/ver-//g'
|
awk
-F
'-'
'{print $1}'
)
${
csudo
}
./make-taos-tools-deb.sh
${
top_dir
}
\
${
compile_dir
}
${
output_dir
}
${
taos_tools_ver
}
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
fi
...
...
@@ -296,7 +295,7 @@ if [ "$osType" != "Darwin" ]; then
cd
${
top_dir
}
/src/kit/taos-tools/packaging/rpm
[
-z
"
$taos_tools_ver
"
]
&&
taos_tools_ver
=
"0.1.0"
taos_tools_ver
=
$(
git describe
--tags
|sed
-e
's/ver-//g'
|awk
-F
'-'
'{print $1}'
|
sed
-e
's/-/_/g'
)
taos_tools_ver
=
$(
git describe
--tags
|
sed
-e
's/ver-//g'
|
awk
-F
'-'
'{print $1}'
|
sed
-e
's/-/_/g'
)
${
csudo
}
./make-taos-tools-rpm.sh
${
top_dir
}
\
${
compile_dir
}
${
output_dir
}
${
taos_tools_ver
}
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
fi
...
...
@@ -309,15 +308,9 @@ if [ "$osType" != "Darwin" ]; then
echo
"====do tar.gz package for all systems===="
cd
${
script_dir
}
/tools
if
[[
"
$dbName
"
==
"taos"
]]
;
then
${
csudo
}
./makepkg.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
verNumberComp
}
${
csudo
}
./makeclient.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
csudo
}
./makearbi.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
else
${
csudo
}
./makepkg_
$dbName
.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
dbName
}
${
verNumberComp
}
${
csudo
}
./makeclient_
$dbName
.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
dbName
}
${
csudo
}
./makearbi_
$dbName
.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
fi
${
csudo
}
./makepkg.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
verNumberComp
}
${
dbName
}
${
csudo
}
./makeclient.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
dbName
}
${
csudo
}
./makearbi.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
dbName
}
else
# only make client for Darwin
...
...
packaging/tools/makepkg.sh
浏览文件 @
a009cbdc
...
...
@@ -15,6 +15,7 @@ verMode=$6
verType
=
$7
pagMode
=
$8
versionComp
=
$9
dbName
=
${
10
}
script_dir
=
"
$(
dirname
$(
readlink
-f
$0
))
"
top_dir
=
"
$(
readlink
-f
${
script_dir
}
/../..
)
"
...
...
@@ -24,23 +25,37 @@ build_dir="${compile_dir}/build"
code_dir
=
"
${
top_dir
}
/src"
release_dir
=
"
${
top_dir
}
/release"
if
[
$dbName
==
"power"
]
;
then
productName
=
"PowerDB"
elif
[
$dbName
==
"tq"
]
;
then
productName
=
"TQ"
elif
[
$dbName
==
"pro"
]
;
then
productName
=
"ProDB"
elif
[
$dbName
==
"kh"
]
;
then
productName
=
"KingHistorian"
elif
[
$dbName
==
"jh"
]
;
then
productName
=
"jh_iot"
else
productName
=
"TDengine"
fi
#package_name='linux'
if
[
"
$verMode
"
==
"cluster"
]
;
then
install_dir
=
"
${
release_dir
}
/TDengine
-enterprise-server-
${
version
}
"
install_dir
=
"
${
release_dir
}
/
${
productName
}
-enterprise-server-
${
version
}
"
else
install_dir
=
"
${
release_dir
}
/TDengine
-server-
${
version
}
"
install_dir
=
"
${
release_dir
}
/
${
productName
}
-server-
${
version
}
"
fi
if
[
-d
${
top_dir
}
/src/kit/taos-tools/packaging/deb
]
;
then
cd
${
top_dir
}
/src/kit/taos-tools/packaging/deb
[
-z
"
$taos_tools_ver
"
]
&&
taos_tools_ver
=
"0.1.0"
taostools_ver
=
$(
git describe
--tags
|sed
-e
's/ver-//g'
|
awk
-F
'-'
'{print $1}'
)
taostools_install_dir
=
"
${
release_dir
}
/taos
-tools-
${
taostools_ver
}
"
taostools_ver
=
$(
git describe
--tags
|
sed
-e
's/ver-//g'
|
awk
-F
'-'
'{print $1}'
)
taostools_install_dir
=
"
${
release_dir
}
/
${
productName
}
-tools-
${
taostools_ver
}
"
cd
${
curr_dir
}
else
taostools_install_dir
=
"
${
release_dir
}
/taos
-tools-
${
version
}
"
taostools_install_dir
=
"
${
release_dir
}
/
${
productName
}
-tools-
${
version
}
"
fi
# Directories and files
...
...
@@ -93,7 +108,6 @@ mkdir -p ${install_dir}
mkdir
-p
${
install_dir
}
/inc
&&
cp
${
header_files
}
${
install_dir
}
/inc
mkdir
-p
${
install_dir
}
/cfg
&&
cp
${
cfg_dir
}
/taos.cfg
${
install_dir
}
/cfg/taos.cfg
if
[
-f
"
${
compile_dir
}
/test/cfg/taosadapter.toml"
]
;
then
cp
${
compile_dir
}
/test/cfg/taosadapter.toml
${
install_dir
}
/cfg
||
:
fi
...
...
@@ -122,18 +136,18 @@ mkdir -p ${install_dir}/init.d && cp ${init_file_tarbitrator_rpm} ${install_dir}
if
[
-n
"
${
taostools_bin_files
}
"
]
;
then
mkdir
-p
${
taostools_install_dir
}
||
echo
-e
"failed to create
${
taostools_install_dir
}
"
mkdir
-p
${
taostools_install_dir
}
/bin
\
&&
cp
${
taostools_bin_files
}
${
taostools_install_dir
}
/bin
\
&&
chmod
a+x
${
taostools_install_dir
}
/bin/
*
||
:
[
-f
${
taostools_install_dir
}
/bin/taosBenchmark
]
&&
\
mkdir
-p
${
taostools_install_dir
}
/bin
&&
cp
${
taostools_bin_files
}
${
taostools_install_dir
}
/bin
&&
chmod
a+x
${
taostools_install_dir
}
/bin/
*
||
:
[
-f
${
taostools_install_dir
}
/bin/taosBenchmark
]
&&
ln
-sf
${
taostools_install_dir
}
/bin/taosBenchmark
\
${
taostools_install_dir
}
/bin/taosdemo
if
[
-f
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-taostools.sh
]
;
then
cp
${
top_dir
}
/src/kit/taos-tools/packaging/tools/install-taostools.sh
\
${
taostools_install_dir
}
/
>
/dev/null
\
&&
chmod
a+x
${
taostools_install_dir
}
/install-taostools.sh
\
||
echo
-e
"failed to copy install-taostools.sh"
${
taostools_install_dir
}
/
>
/dev/null
&&
chmod
a+x
${
taostools_install_dir
}
/install-taostools.sh
||
echo
-e
"failed to copy install-taostools.sh"
else
echo
-e
"install-taostools.sh not found"
fi
...
...
@@ -179,7 +193,7 @@ if [ -f ${build_dir}/bin/jemalloc-config ]; then
fi
if
[
"
$verMode
"
==
"cluster"
]
;
then
sed
's/verMode=edge/verMode=cluster/g'
${
install_dir
}
/bin/remove.sh
>>
remove_temp.sh
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
...
...
@@ -205,11 +219,11 @@ fi
cd
${
curr_dir
}
cp
${
install_files
}
${
install_dir
}
if
[
"
$verMode
"
==
"cluster"
]
;
then
sed
's/verMode=edge/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
fi
if
[
"
$pagMode
"
==
"lite"
]
;
then
sed
's/pagMode=full/pagMode=lite/g'
${
install_dir
}
/install.sh
>>
install_temp.sh
sed
's/pagMode=full/pagMode=lite/g'
${
install_dir
}
/install.sh
>>
install_temp.sh
mv
install_temp.sh
${
install_dir
}
/install.sh
fi
chmod
a+x
${
install_dir
}
/install.sh
...
...
@@ -217,7 +231,7 @@ chmod a+x ${install_dir}/install.sh
# Copy example code
mkdir
-p
${
install_dir
}
/examples
examples_dir
=
"
${
top_dir
}
/tests/examples"
cp
-r
${
examples_dir
}
/c
${
install_dir
}
/examples
cp
-r
${
examples_dir
}
/c
${
install_dir
}
/examples
if
[[
"
$pagMode
"
!=
"lite"
]]
&&
[[
"
$cpuType
"
!=
"aarch32"
]]
;
then
if
[
-d
${
examples_dir
}
/JDBC/connectionPools/target
]
;
then
rm
-rf
${
examples_dir
}
/JDBC/connectionPools/target
...
...
@@ -247,13 +261,13 @@ if [[ "$pagMode" != "lite" ]] && [[ "$cpuType" != "aarch32" ]]; then
cp
-r
${
examples_dir
}
/C#
${
install_dir
}
/examples
fi
# Copy driver
mkdir
-p
${
install_dir
}
/driver
&&
cp
${
lib_files
}
${
install_dir
}
/driver
&&
echo
"
${
versionComp
}
"
>
${
install_dir
}
/driver/vercomp.txt
mkdir
-p
${
install_dir
}
/driver
&&
cp
${
lib_files
}
${
install_dir
}
/driver
&&
echo
"
${
versionComp
}
"
>
${
install_dir
}
/driver/vercomp.txt
# Copy connector
connector_dir
=
"
${
code_dir
}
/connector"
mkdir
-p
${
install_dir
}
/connector
if
[[
"
$pagMode
"
!=
"lite"
]]
&&
[[
"
$cpuType
"
!=
"aarch32"
]]
;
then
cp
${
build_dir
}
/lib/
*
.jar
${
install_dir
}
/connector
||
:
cp
${
build_dir
}
/lib/
*
.jar
${
install_dir
}
/connector
||
:
if
find
${
connector_dir
}
/go
-mindepth
1
-maxdepth
1 |
read
;
then
cp
-r
${
connector_dir
}
/go
${
install_dir
}
/connector
else
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录