[chore](build) avoid generating generated code every time (#19813)

When calling generated-source.sh in build.sh, not to remove the gensrc/build dir.
This commit is contained in:
Mingyu Chen
2023-05-19 08:47:36 +08:00
committed by GitHub
parent 3e010bbee7
commit 3d795de2d5
2 changed files with 11 additions and 2 deletions

View File

@ -75,6 +75,7 @@ Usage: $0 <options>
clean_gensrc() {
pushd "${DORIS_HOME}/gensrc"
make clean
rm -rf "${DORIS_HOME}/gensrc/build"
rm -rf "${DORIS_HOME}/fe/fe-common/target"
rm -rf "${DORIS_HOME}/fe/fe-core/target"
popd
@ -401,7 +402,7 @@ echo "Get params:
if [[ "${CLEAN}" -eq 1 ]]; then
clean_gensrc
fi
"${DORIS_HOME}"/generated-source.sh
"${DORIS_HOME}"/generated-source.sh noclean
# Assesmble FE modules
FE_MODULES=''

View File

@ -30,7 +30,15 @@ export DORIS_HOME="${ROOT}"
echo "Build generated code"
cd "${DORIS_HOME}/gensrc"
rm -rf "${DORIS_HOME}/gensrc/build"
# if calling from build.sh, no need to clean build/ dir.
# it will be removed by using `build.sh --clean`.
# when run this script along, it will always remove the build/ dir.
if [[ "$#" == 0 ]]; then
echo "rm -rf ${DORIS_HOME}/gensrc/build"
rm -rf "${DORIS_HOME}/gensrc/build"
fi
# DO NOT using parallel make(-j) for gensrc
make
rm -rf "${DORIS_HOME}/fe/fe-common/src/main/java/org/apache/doris/thrift ${DORIS_HOME}/fe/fe-common/src/main/java/org/apache/parquet"