Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions ci/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,11 @@ cp -r "${source_dir}/arrow-format" "${build_dir}"
cp -r "${source_dir}/dev" "${build_dir}"

# Instead of hardcoding the list of directories to copy, find pom.xml and then
# crawl back up to the top. GNU realpath has --relative-to but this does not
# work on macOS

poms=$(find "${source_dir}" -not \( -path "${source_dir}"/build -prune \) -type f -name pom.xml)
if [[ "$OSTYPE" == "darwin"* ]]; then
poms=$(echo "$poms" | xargs -n1 python -c "import sys; import os.path; print(os.path.relpath(sys.argv[1], '${source_dir}'))")
else
poms=$(echo "$poms" | xargs -n1 realpath -s --relative-to="${source_dir}")
fi
# crawl back up to the top.
poms=$(cd "${source_dir}" && find . -not \( -path ./build -prune \) -type f -name pom.xml)

for source_root in $(echo "${poms}" | awk -F/ '{print $1}' | sort -u); do
# ./dataset/pom.xml -> dataset
for source_root in $(echo "${poms}" | awk -F/ '{print $2}' | sort -u); do
cp -r "${source_dir}/${source_root}" "${build_dir}"
done

Expand Down
Loading