assignUser commented on code in PR #13622:
URL: https://github.com/apache/arrow/pull/13622#discussion_r923169224


##########
dev/release/05-binary-upload.sh:
##########
@@ -104,6 +105,28 @@ fi
 if [ ${UPLOAD_PYTHON} -gt 0 ]; then
   rake_tasks+=(python:rc)
 fi
+if [ ${UPLOAD_R} -gt 0 ]; then
+  rake_tasks+=(r:rc)
+  # The R libarrow binaries have to be converted to the correct dir structure
+  pushd $artifact_dir/r-binary-packages
+  # R package binaries are distributed via CRAN
+  rm  r-pkg*
+  r_src_files=$(ls r-lib*)
+  # Decode relative path from file name.
+  # r-lib__libarrow__bin__centos-7__arrow-8.0.0.zip 
+  # --> libarrow/bin/centos-7/arrow-8.0.0.zip
+  r_dest_files=($(echo $r_src_files | sed 's/r-lib__//g; s/__/\//g'))
+  r_src_files=($r_src_files)
+
+  mkdir -p $(dirname ${r_dest_files[@]})
+  r_length=${#r_dest_files[@]}
+
+  for (( i=0; i<${r_length}; i++ ));
+  do
+    mv ${r_src_files[$i]} ${r_dest_files[$i]}
+  done
+  popd

Review Comment:
   Ok, I could also use `cp` and add a clean up step in the beginning? That way 
it would still be repeatable, but feel free to add a diff for the ruby version 
(or add it in a follow up?)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to