Skip to content

Commit afcd76d

Browse files
committed
fix format failures
1 parent 331a5f9 commit afcd76d

File tree

3 files changed

+37
-34
lines changed

3 files changed

+37
-34
lines changed

ci/scripts/java_build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ cp -r "${source_dir}/dev" "${build_dir}"
4949

5050
poms=$(find "${source_dir}" -not \( -path "${source_dir}"/build -prune \) -type f -name pom.xml)
5151
if [[ "$OSTYPE" == "darwin"* ]]; then
52-
poms=$(echo "$poms" | xargs -n1 python -c "import sys; import os.path; print(os.path.relpath(sys.argv[1], '${source_dir}'))")
52+
poms=$(echo "$poms" | xargs -n1 python -c "import sys; import os.path; print(os.path.relpath(sys.argv[1], '${source_dir}'))")
5353
else
54-
poms=$(echo "$poms" | xargs -n1 realpath -s --relative-to="${source_dir}")
54+
poms=$(echo "$poms" | xargs -n1 realpath -s --relative-to="${source_dir}")
5555
fi
5656

5757
for source_root in $(echo "${poms}" | awk -F/ '{print $1}' | sort -u); do
58-
cp -r "${source_dir}/${source_root}" "${build_dir}"
58+
cp -r "${source_dir}/${source_root}" "${build_dir}"
5959
done
6060

6161
pushd "${build_dir}"

ci/scripts/java_jni_build.sh

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,54 +27,54 @@ prefix_dir="${build_dir}/java-jni"
2727

2828
echo "=== Clear output directories and leftovers ==="
2929
# Clear output directories and leftovers
30-
rm -rf ${build_dir}
30+
rm -rf "${build_dir}"
3131

3232
echo "=== Building Arrow Java C Data Interface native library ==="
3333
mkdir -p "${build_dir}"
3434
pushd "${build_dir}"
3535

3636
case "$(uname)" in
37-
Linux)
38-
n_jobs=$(nproc)
39-
;;
40-
Darwin)
41-
n_jobs=$(sysctl -n hw.logicalcpu)
42-
;;
43-
*)
44-
n_jobs=${NPROC:-1}
45-
;;
37+
Linux)
38+
n_jobs=$(nproc)
39+
;;
40+
Darwin)
41+
n_jobs=$(sysctl -n hw.logicalcpu)
42+
;;
43+
*)
44+
n_jobs=${NPROC:-1}
45+
;;
4646
esac
4747

48-
: ${ARROW_JAVA_BUILD_TESTS:=${ARROW_BUILD_TESTS:-OFF}}
49-
: ${CMAKE_BUILD_TYPE:=release}
48+
: "${ARROW_JAVA_BUILD_TESTS:=${ARROW_BUILD_TESTS:-OFF}}"
49+
: "${CMAKE_BUILD_TYPE:=release}"
5050
cmake \
51-
-DARROW_JAVA_JNI_ENABLE_DATASET=${ARROW_DATASET:-OFF} \
52-
-DARROW_JAVA_JNI_ENABLE_GANDIVA=${ARROW_GANDIVA:-OFF} \
53-
-DARROW_JAVA_JNI_ENABLE_ORC=${ARROW_ORC:-OFF} \
54-
-DBUILD_TESTING=${ARROW_JAVA_BUILD_TESTS} \
55-
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
56-
-DCMAKE_PREFIX_PATH=${arrow_install_dir} \
57-
-DCMAKE_INSTALL_PREFIX=${prefix_dir} \
58-
-DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD:-OFF} \
51+
-DARROW_JAVA_JNI_ENABLE_DATASET="${ARROW_DATASET:-OFF}" \
52+
-DARROW_JAVA_JNI_ENABLE_GANDIVA="${ARROW_GANDIVA:-OFF}" \
53+
-DARROW_JAVA_JNI_ENABLE_ORC="${ARROW_ORC:-OFF}" \
54+
-DBUILD_TESTING="${ARROW_JAVA_BUILD_TESTS}" \
55+
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
56+
-DCMAKE_PREFIX_PATH="${arrow_install_dir}" \
57+
-DCMAKE_INSTALL_PREFIX="${prefix_dir}" \
58+
-DCMAKE_UNITY_BUILD="${CMAKE_UNITY_BUILD:-OFF}" \
5959
-DProtobuf_USE_STATIC_LIBS=ON \
6060
-GNinja \
61-
${JAVA_JNI_CMAKE_ARGS:-} \
62-
${arrow_dir}
61+
"${JAVA_JNI_CMAKE_ARGS:-}" \
62+
"${arrow_dir}"
6363
export CMAKE_BUILD_PARALLEL_LEVEL=${n_jobs}
64-
cmake --build . --config ${CMAKE_BUILD_TYPE}
64+
cmake --build . --config "${CMAKE_BUILD_TYPE}"
6565
if [ "${ARROW_JAVA_BUILD_TESTS}" = "ON" ]; then
6666
ctest \
6767
--output-on-failure \
68-
--parallel ${n_jobs} \
68+
--parallel "${n_jobs}" \
6969
--timeout 300
7070
fi
71-
cmake --build . --config ${CMAKE_BUILD_TYPE} --target install
71+
cmake --build . --config "${CMAKE_BUILD_TYPE}" --target install
7272
popd
7373

74-
mkdir -p ${dist_dir}
74+
mkdir -p "${dist_dir}"
7575
# For Windows. *.dll are installed into bin/ on Windows.
7676
if [ -d "${prefix_dir}/bin" ]; then
77-
mv ${prefix_dir}/bin/* ${dist_dir}/
77+
mv "${prefix_dir}"/bin/* "${dist_dir}"/
7878
else
79-
mv ${prefix_dir}/lib/* ${dist_dir}/
79+
mv "${prefix_dir}"/lib/* "${dist_dir}"/
8080
fi

ci/scripts/java_test.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ if [ "${ARROW_JAVA_JNI}" = "ON" ]; then
4242
fi
4343
if [ "${#projects[@]}" -gt 0 ]; then
4444
${mvn} clean test \
45-
-Parrow-jni \
46-
-pl "$(IFS=,; echo \""${projects[*]}"\")" \
47-
-Darrow.cpp.build.dir="${java_jni_dist_dir}"
45+
-Parrow-jni \
46+
-pl "$(
47+
IFS=,
48+
echo \""${projects[*]}"\"
49+
)" \
50+
-Darrow.cpp.build.dir="${java_jni_dist_dir}"
4851
fi
4952

5053
if [ "${ARROW_JAVA_CDATA}" = "ON" ]; then

0 commit comments

Comments
 (0)