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


##########
dev/tasks/macros.jinja:
##########
@@ -221,3 +222,79 @@ on:
         cp ${formula} $(brew --repository homebrew/core)/Formula/
       done
 {% endmacro %}
+
+{%- macro github_change_r_pkg_version(is_fork, version = '\\2.\'\"$(date 
+%Y%m%d)\"\'' ) -%}
+  - name: Modify version
+    shell: bash
+    run: |
+      cd arrow/r
+      sed -i.bak -E -e \
+        's/(^Version: )([0-9]+\.[0-9]+\.[0-9]+).*$/\1{{ version }}/' \
+        DESCRIPTION
+      head DESCRIPTION
+      rm -f DESCRIPTION.bak
+      cp ../dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb 
tools/apache-arrow.rb
+      
+      # Pin the git commit in the formula to match
+      cd tools
+      if [ "{{ is_fork }}" == "true" ]; then 
+        sed -i.bak -E -e 's/apache\/arrow.git"$/{{ 
arrow.github_repo.split("/") | join("\/") }}.git", :revision => "'"{{ 
arrow.head }}"'"/' apache-arrow.rb
+      else
+        sed -i.bak -E -e 's/arrow.git"$/arrow.git", :revision => "'"{{ 
arrow.head }}"'"/' apache-arrow.rb
+      fi
+      rm -f apache-arrow.rb.bak
+{% endmacro %}
+
+{%- macro github_test_r_src_pkg() -%}
+  
source("https://raw.githubusercontent.com/apache/arrow/master/ci/etc/rprofile";)
+  
+  install.packages(
+    "arrow",
+    repos = c(getOption("arrow.dev_repo"), "https://cloud.r-project.org";),
+    verbose = TRUE
+  )
+  
+  library(arrow)
+  read_parquet(system.file("v0.7.1.parquet", package = "arrow"))
+
+  # Our Version should always be > CRAN so we would detect a CRAN version here.
+  stopifnot(packageVersion("arrow") == {{ 
'"${{needs.source.outputs.version}}"' }})
+{% endmacro %}
+
+{%- macro github_setup_local_r_repo(is_fork, os, get_bin = 'true') -%}
+  - name: Setup local repo
+    if: {{ is_fork }}
+    shell: bash
+    run: mkdir repo 
+  - name: Get windows binary
+    if: {{ '${{' }} {{ is_fork }} && ({{ os }} == 'windows-latest') && {{ 
get_bin }} {{ '}}' }}
+    uses: actions/download-artifact@v3
+    with:
+      name: r-windows-libarrow
+      path: repo/libarrow/bin/windows
+  - name: Get ubuntu binary
+    if: {{ '${{' }} {{ is_fork }} && ({{ os }} != 'windows-latest') && {{ 
get_bin }} {{ '}}' }}
+    uses: actions/download-artifact@v3
+    with:
+      name: r-ubuntu-libarrow
+      path: repo/libarrow/bin/ubuntu-18.04
+  - name: Get centos binary
+    if: {{ '${{' }} {{ is_fork }} && ({{ os }} != 'windows-latest') && {{ 
get_bin }} {{ '}}' }}
+    uses: actions/download-artifact@v3
+    with:
+      name: r-centos-libarrow
+      path: repo/libarrow/bin/centos-7

Review Comment:
   The download-artifact action only supports downloading one or all artifacts 
and we would need to move them to the proper paths afterward so this is ok. 
   (the additional centos/ubuntu file has no impact on the non-matching os 
build process)



-- 
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