Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_dockerfile_* uses install_github for non-github remote dependencies #16

Open
ColinFay opened this issue Sep 24, 2021 · 1 comment
Open

Comments

@ColinFay
Copy link
Member

The internal function creating the dockerfile docker_from_desc always uses remotes::install_github for any non-cran dependencies. But there's more than github!

Our company uses bitbucket but gitlab is also pretty common. Mind you, you're not the only ones to be github-centric - I have already fixed the same issues in usethis and others.

The Remote information is actually in the package description, so handling more providers is as easy as doing:

install_fun <- function(remote) {
  remote <- tolower(remote)
  ifelse(tolower(remote) %in% c("github", "bitbucket", "gitlab"),
           paste0("remote::install_", remote),
           "# Could not generate install code for: ")
}

install_fun("Bitbucket")
#> [1] "remote::install_bitbucket"
install_fun("Github")
#> [1] "remote::install_github"

From there it is easy to adapt golem:::dock_from_desc. I'll prepare a PR when I have some time.

Migrated from ThinkR-open/golem#425

@ColinFay
Copy link
Member Author

Original issue from @antoine-sachet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant