William Cheng 4635dda518
[R] Add httr2 support (work in progress) (#13005)
* add httr2 support to r client gen

* fix headers

* add accepts, content-types

* update samples

* fix req

* update samples

* various fixes

* add data file test

* fix streaming, add tests
2022-08-01 00:58:19 +08:00

27 lines
864 B
Bash

#!/bin/bash
set -e
REPO=https://cloud.r-project.org
export R_LIBS_USER=$HOME/R
echo "R lib directory: $R_LIBS_USER"
mkdir $R_LIBS_USER || true
Rscript -e "install.packages('jsonlite', repos='$REPO', lib='$R_LIBS_USER')"
Rscript -e "install.packages('httr', repos='$REPO', lib='$R_LIBS_USER')"
Rscript -e "install.packages('testthat', repos='$REPO', lib='$R_LIBS_USER')"
Rscript -e "install.packages('R6', repos='$REPO', lib='$R_LIBS_USER')"
Rscript -e "install.packages('base64enc', repos='$REPO', lib='$R_LIBS_USER')"
Rscript -e "install.packages('rlang', repos='$REPO', lib='$R_LIBS_USER')"
Rscript -e "install.packages('rjson', repos='$REPO', lib='$R_LIBS_USER')"
Rscript -e "install.packages('devtools', repos='$REPO', lib='$R_LIBS_USER')"
rm petstore_1.0.0.tar.gz || true
R CMD build .
R CMD check *tar.gz --no-manual
R CMD install --preclean *tar.gz