This is an automated email from the ASF dual-hosted git repository.

npr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new b7507c34b7 ARROW-16594: [R] Consistently use "getOption" to set 
nightly repo
b7507c34b7 is described below

commit b7507c34b71a200c9f08597b83e935d1639dd85c
Author: Jacob Wujciak-Jens <[email protected]>
AuthorDate: Fri May 20 07:52:44 2022 -0700

    ARROW-16594: [R] Consistently use "getOption" to set nightly repo
    
    The behavior can be seen in action 
[here](https://github.com/assignUser/test-repo-a/actions/runs/2340358110) where 
I build this branch with the daily version number `20220517` which does not yet 
exists in the s3 bucket.
    ~~It actually looks like it is not working for linux binary builds 
https://github.com/assignUser/test-repo-a/runs/6472478941?check_suite_focus=true#step:4:153~~
 This issue was due to .Rprofile configuration.
    
    Closes #13173 from assignUser/ARROW-16594-option-devrepo
    
    Authored-by: Jacob Wujciak-Jens <[email protected]>
    Signed-off-by: Neal Richardson <[email protected]>
---
 r/tools/nixlibs.R | 2 +-
 r/tools/winlibs.R | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R
index fc523f49ed..5b8cc3b72d 100644
--- a/r/tools/nixlibs.R
+++ b/r/tools/nixlibs.R
@@ -19,7 +19,7 @@ args <- commandArgs(TRUE)
 VERSION <- args[1]
 dst_dir <- paste0("libarrow/arrow-", VERSION)
 
-arrow_repo <- "https://arrow-r-nightly.s3.amazonaws.com/libarrow/";
+arrow_repo <- paste0(getOption("arrow.dev_repo", 
"https://arrow-r-nightly.s3.amazonaws.com";), "/libarrow/")
 
 options(.arrow.cleanup = character()) # To collect dirs to rm on exit
 on.exit(unlink(getOption(".arrow.cleanup")))
diff --git a/r/tools/winlibs.R b/r/tools/winlibs.R
index 9435ac3c20..4adedbddb2 100644
--- a/r/tools/winlibs.R
+++ b/r/tools/winlibs.R
@@ -38,7 +38,10 @@ if 
(!file.exists(sprintf("windows/arrow-%s/include/arrow/api.h", VERSION))) {
       )
     }
     # URL templates
-    nightly <- 
"https://arrow-r-nightly.s3.amazonaws.com/libarrow/bin/windows/arrow-%s.zip";
+    nightly <- paste0(
+      getOption("arrow.dev_repo", "https://arrow-r-nightly.s3.amazonaws.com";),
+      "/libarrow/bin/windows/arrow-%s.zip"
+    )
     rwinlib <- "https://github.com/rwinlib/arrow/archive/v%s.zip";
     # First look for a nightly
     get_file(nightly, VERSION)

Reply via email to