Skip to content

Commit

Permalink
Merge pull request #29442 from taosdata/fix/main/TD-33397
Browse files Browse the repository at this point in the history
fix:update compiling explorer from taosx repo
  • Loading branch information
feici02 authored Jan 2, 2025
2 parents 657c02e + d574b59 commit 4984a6c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
13 changes: 7 additions & 6 deletions packaging/deb/makedeb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ verType=$7
script_dir="$(dirname $(readlink -f $0))"
top_dir="$(readlink -f ${script_dir}/../..)"
pkg_dir="${top_dir}/debworkroom"
taosx_dir="$(readlink -f ${script_dir}/../../../../taosx)"

#echo "curr_dir: ${curr_dir}"
#echo "top_dir: ${top_dir}"
Expand Down Expand Up @@ -81,11 +82,11 @@ fi
if [ -f "${compile_dir}/test/cfg/taoskeeper.service" ]; then
cp ${compile_dir}/test/cfg/taoskeeper.service ${pkg_dir}${install_home_path}/cfg || :
fi
if [ -f "${compile_dir}/../../../explorer/target/taos-explorer.service" ]; then
cp ${compile_dir}/../../../explorer/target/taos-explorer.service ${pkg_dir}${install_home_path}/cfg || :
if [ -f "${taosx_dir}/explorer/server/examples/explorer.service" ]; then
cp ${taosx_dir}/explorer/server/examples/explorer.service ${pkg_dir}${install_home_path}/cfg/taos-explorer.service || :
fi
if [ -f "${compile_dir}/../../../explorer/server/example/explorer.toml" ]; then
cp ${compile_dir}/../../../explorer/server/example/explorer.toml ${pkg_dir}${install_home_path}/cfg || :
if [ -f "${taosx_dir}/explorer/server/examples/explorer.toml" ]; then
cp ${taosx_dir}/explorer/server/examples/explorer.toml ${pkg_dir}${install_home_path}/cfg || :
fi

# cp ${taoskeeper_binary} ${pkg_dir}${install_home_path}/bin
Expand Down Expand Up @@ -113,8 +114,8 @@ if [ -f "${compile_dir}/build/bin/taoskeeper" ]; then
cp ${compile_dir}/build/bin/taoskeeper ${pkg_dir}${install_home_path}/bin ||:
fi

if [ -f "${compile_dir}/../../../explorer/target/release/taos-explorer" ]; then
cp ${compile_dir}/../../../explorer/target/release/taos-explorer ${pkg_dir}${install_home_path}/bin ||:
if [ -f "${taosx_dir}/target/release/taos-explorer" ]; then
cp ${taosx_dir}/target/release/taos-explorer ${pkg_dir}${install_home_path}/bin ||:
fi

cp ${compile_dir}/build/bin/taos ${pkg_dir}${install_home_path}/bin
Expand Down
3 changes: 2 additions & 1 deletion packaging/rpm/makerpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ verType=$7
script_dir="$(dirname $(readlink -f $0))"
top_dir="$(readlink -f ${script_dir}/../..)"
pkg_dir="${top_dir}/rpmworkroom"
taosx_dir="$(readlink -f ${script_dir}/../../../../taosx)"
spec_file="${script_dir}/tdengine.spec"

#echo "curr_dir: ${curr_dir}"
Expand Down Expand Up @@ -76,7 +77,7 @@ cd ${pkg_dir}

${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}
${csudo}rpmbuild --define="_version ${tdengine_ver}" --define="_topdir ${pkg_dir}" --define="_compiledir ${compile_dir}" --define="_taosxdir ${taosx_dir}" -bb ${spec_file}

# copy rpm package to output_dir, and modify package name, then clean temp dir
#${csudo}cp -rf RPMS/* ${output_dir}
Expand Down
12 changes: 6 additions & 6 deletions packaging/rpm/tdengine.spec
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ if [ -f %{_compiledir}/test/cfg/taoskeeper.service ]; then
cp %{_compiledir}/test/cfg/taoskeeper.service %{buildroot}%{homepath}/cfg ||:
fi

if [ -f %{_compiledir}/../../../explorer/target/taos-explorer.service ]; then
cp %{_compiledir}/../../../explorer/target/taos-explorer.service %{buildroot}%{homepath}/cfg ||:
if [ -f %{_taosxdir}/explorer/server/examples/explorer.service ]; then
cp %{_taosxdir}/explorer/server/examples/explorer.service %{buildroot}%{homepath}/cfg/taos-explorer.service ||:
fi

if [ -f %{_compiledir}/../../../explorer/server/examples/explorer.toml ]; then
cp %{_compiledir}/../../../explorer/server/examples/explorer.toml %{buildroot}%{homepath}/cfg ||:
if [ -f %{_taosxdir}/explorer/server/examples/explorer.toml ]; then
cp %{_taosxdir}/explorer/server/examples/explorer.toml %{buildroot}%{homepath}/cfg ||:
fi

#cp %{_compiledir}/../packaging/rpm/taosd %{buildroot}%{homepath}/init.d
Expand All @@ -100,8 +100,8 @@ cp %{_compiledir}/../../enterprise/packaging/stop-all.sh %{buildroot}%{homepath
sed -i "s/versionType=\"enterprise\"/versionType=\"community\"/g" %{buildroot}%{homepath}/bin/start-all.sh
sed -i "s/versionType=\"enterprise\"/versionType=\"community\"/g" %{buildroot}%{homepath}/bin/stop-all.sh

if [ -f %{_compiledir}/../../../explorer/target/release/taos-explorer ]; then
cp %{_compiledir}/../../../explorer/target/release/taos-explorer %{buildroot}%{homepath}/bin
if [ -f %{_taosxdir}/target/release/taos-explorer ]; then
cp %{_taosxdir}/target/release/taos-explorer %{buildroot}%{homepath}/bin
fi

if [ -f %{_compiledir}/build/bin//taoskeeper ]; then
Expand Down

0 comments on commit 4984a6c

Please sign in to comment.