Skip to content

Commit

Permalink
[chore](release) build-for-release.sh support arm (apache#19270)
Browse files Browse the repository at this point in the history
Use `uname -m` to get arch
  • Loading branch information
morningman authored May 4, 2023
1 parent 4e4fb33 commit ddd67db
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions build-for-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,20 @@ echo "Get params:
TAR -- ${TAR}
"

sh build.sh --clean &&
USE_AVX2="${_USE_AVX2}" sh build.sh &&
USE_AVX2="${_USE_AVX2}" sh build.sh --be --meta-tool
ARCH="$(uname -m)"

echo "Begin to pack"
ORI_OUTPUT="${ROOT}/output"

FE=apache-doris-fe-${VERSION}-bin-x86_64
BE=apache-doris-be-${VERSION}-bin-x86_64
DEPS=apache-doris-dependencies-${VERSION}-bin-x86_64
FE="apache-doris-fe-${VERSION}-bin-${ARCH}"
BE="apache-doris-be-${VERSION}-bin-${ARCH}"
DEPS="apache-doris-dependencies-${VERSION}-bin-${ARCH}"

OUTPUT="${ORI_OUTPUT}/apache-doris-${VERSION}-bin-x86_64"
OUTPUT="${ORI_OUTPUT}/apache-doris-${VERSION}-bin-${ARCH}"
OUTPUT_FE="${OUTPUT}/${FE}"
OUTPUT_DEPS="${OUTPUT}/${DEPS}"
OUTPUT_BE="${OUTPUT}/${BE}"

if [[ "${_USE_AVX2}" == "0" ]]; then
if [[ "${_USE_AVX2}" == "0" && "${ARCH}" == "x86_64" ]]; then
OUTPUT_BE="${OUTPUT_BE}-noavx2"
fi

Expand All @@ -133,6 +130,11 @@ echo "FE: ${OUTPUT_FE}"
echo "BE: ${OUTPUT_BE}"
echo "JAR: ${OUTPUT_DEPS}"

sh build.sh --clean &&
USE_AVX2="${_USE_AVX2}" sh build.sh &&
USE_AVX2="${_USE_AVX2}" sh build.sh --be --meta-tool

echo "Begin to pack"
rm -rf "${OUTPUT}"
mkdir -p "${OUTPUT_FE}" "${OUTPUT_BE}" "${OUTPUT_DEPS}"

Expand Down

0 comments on commit ddd67db

Please sign in to comment.