Installing specific R package from specific branch from github repo on travis-ci

Viewed 988

I am developing a package which depends on a different package of mine which is still on github. I am using travis-ci to test the package. I added the following to the .travis.yml file to install the dmdScheme package from the dev branch:

language: r
r_github_packages: r-lib/remotes#340
r_github_packages: rkrug/dmdScheme#dev

but I get the following error at travis

Installing R packages from GitHub: rkrug/dmdScheme#dev
0.19s$ Rscript -e 'remotes::install_github(c("rkrug/dmdScheme#dev"))'
Error in parse_repo_spec(repo) : 
  Invalid git repo specification: 'rkrug/dmdScheme#dev'
Calls: <Anonymous> -> lapply -> FUN -> parse_git_repo -> parse_repo_spec
Execution halted
The command "Rscript -e 'remotes::install_github(c("rkrug/dmdScheme#dev"))'" failed and exited with 1 during .

The remotes package is installed.

My question:

What is the correct syntax, to specify the branch (or ref in general) to be used in the command r_github_packages?

1 Answers

As we can see at the Devtools dependencies vignette, we can use @ to specify specific commits, etc. So, you need:

r_github_packages: rkrug/dmdScheme@dev
Related