richfitz / drat.builder

Build tools for a drat
Other
17 stars 2 forks source link

Automatically keep bin paths up to date #25

Open nbenn opened 2 years ago

nbenn commented 2 years ago

I've been playing around a bit with {drat.builder} for the past couple of days, mainly b/c for the second time now, I ran into the issue that my drat repo did not contain the required bin paths (see PRs #23 and #24 and with the imminent release of 4.2 we'll face this once again). In my fork of your repo I added functionality that can check with CRAN to get all current macOS and Windows paths (see https://github.com/richfitz/drat.builder/compare/master...nbenn:master). This exposes an argument check_cran, which when TRUE will get the directories from CRAN (with a bit of cleanup required, as there are also dirs like tools, base, etc. that we don't want) and update the drat repo accordingly. I'm not fetching versions from metacran, as this would not have been able to save us from #24 and the only way to achieve this that I could think of, was accessing CRAN itself.

Happy to submit a PR if this is of interest to you.

richfitz commented 2 years ago

yes, this would be useful thanks (sorry for the delay, totally missed this)