assignUser commented on code in PR #13149:
URL: https://github.com/apache/arrow/pull/13149#discussion_r876841111
##########
dev/tasks/macros.jinja:
##########
@@ -221,3 +222,35 @@ on:
cp ${formula} $(brew --repository homebrew/core)/Formula/
done
{% endmacro %}
+
+{%- macro change_r_pkg_version(date = '$(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.'"{{ date }}"'/' \
+ 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
+ sed -i.bak -E -e 's/arrow.git"$/arrow.git", :revision => "'"{{
arrow.head }}"'"/' apache-arrow.rb
+ rm -f apache-arrow.rb.bak
+{% endmacro %}
+
+{%- macro test_r_src_pkg() -%}
+
source("https://raw.githubusercontent.com/apache/arrow/master/ci/etc/rprofile")
+ options(arrow.dev_repo = "https://nightly.wujciak.de/r")
+
+ install.packages(
+ "arrow",
+ repos = c("https://nightly.wujciak.de/r", getOption("repos")),
+ verbose = TRUE
+ )
+ library(arrow)
+ read_parquet(system.file("v0.7.1.parquet", package = "arrow"))
+ stopifnot(packageVersion("arrow") == {{
'"${{needs.source.outputs.version}}"' }})
+{% endmacro %}
Review Comment:
I had issues getting the rendered macro to be properly indented so I did it
like this. The jinja built-in `indent` takes arguments though which made this
unnecessary.
--
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]