kou commented on code in PR #47140: URL: https://github.com/apache/arrow/pull/47140#discussion_r2217484287
########## dev/release/post-15-conan.sh: ########## @@ -62,13 +62,21 @@ sha256sum=$(curl \ --location \ "https://www.apache.org/dyn/closer.lua?action=download&filename=arrow/arrow-${version}/apache-arrow-${version}.tar.gz.sha256" | \ cut -d' ' -f1) -sed \ + +# Use gsed on macOS and sed otherwise +if [ "$(uname)" == "Darwin" ]; then + SED_BIN_NAME <- "gsed" Review Comment: Is `<-` correct? `=`? How about rename this to just `SED`? ########## dev/release/post-15-conan.sh: ########## @@ -62,13 +62,21 @@ sha256sum=$(curl \ --location \ "https://www.apache.org/dyn/closer.lua?action=download&filename=arrow/arrow-${version}/apache-arrow-${version}.tar.gz.sha256" | \ cut -d' ' -f1) -sed \ + +# Use gsed on macOS and sed otherwise +if [ "$(uname)" == "Darwin" ]; then + SED_BIN_NAME <- "gsed" +else + SED_BIN_NAME <- "sed" +fi + +SED_BIN_NAME \ Review Comment: How about using GNU sed and BSD sed compatible syntax instead? ```diff diff --git a/dev/release/post-15-conan.sh b/dev/release/post-15-conan.sh index cb45e6b68b..45a23e515d 100755 --- a/dev/release/post-15-conan.sh +++ b/dev/release/post-15-conan.sh @@ -64,15 +64,20 @@ sha256sum=$(curl \ cut -d' ' -f1) sed \ -i.bak \ - -e "1a\ \ \"${version}\":" \ - -e "1a\ \ \ \ folder:\ all" \ + -e "1a\\ +\ \"${version}\":" \ + -e "1a\\ +\ folder:\ all" \ ${recipes_arrow}/config.yml rm ${recipes_arrow}/config.yml.bak sed \ -i.bak \ - -e "1a\ \ \"${version}\":" \ - -e "1a\ \ \ \ url: \"${tar_gz_url}\"" \ - -e "1a\ \ \ \ sha256: \"${sha256sum}\"" \ + -e "1a\\ +\ \"${version}\":" \ + -e "1a\\ +\ url: \"${tar_gz_url}\"" \ + -e "1a\\ +\ sha256: \"${sha256sum}\"" \ ${recipes_arrow}/all/conandata.yml rm ${recipes_arrow}/all/conandata.yml.bak git add ${recipes_arrow}/config.yml ``` (I checked this with "sed (GNU sed) 4.9" and `sed` on macOS 15.4.) -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org