-
Notifications
You must be signed in to change notification settings - Fork 6
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
Use JSON API for chromedriver versions #3
Conversation
I'm not sure we can rely on |
Actually, maybe if we state that Also, I'm seeing 113.0.5672.0 in the JSON file, so I'm okay with that. |
Oh, yeah. I wonder if it should try to filter only to versions where there are chromedriver download URLs available. Right now all the versions are listed, but only versions |
Hmm. Unlikely that requiring jq is going to wash; if I try to move this to asdf-community they'll likely object to it requiring something that is asdf-installable itself. |
Yeah that makes sense. I wish Darwin shipped with something like jq, it would make a lot of things easier including this. I thought your usage of IFS in the original implementation was incredibly clever, but I just don't see how it could be used for JSON parsing. Listing versions could use grep and/or awk. Finding download urls, though... maybe sed to replace braces, and grep with negative lookaheads to find specific patterns without jumping ahead to the next version? |
I'm almost certain I'm not that clever...pretty sure I pinched that idea from someone else... |
Hmmm. What would you think about the version/url parser using Ruby? While there is an asdf plugin for managing Ruby versions, an old version ships with Darwin:
It wouldn't necessarily be available on Linux, however. |
Thanks for the contribution! |
This is a brute-force attempt to solve #2.
I'm not sure if you want to accept it as-is, because of the implicit dependency on
jq
. Also, it appears as if the new JSON endpoint only starts including chromedriver as of version115.0.5763.0
, which works for my needs but doesn't seem ideal.Also note that the zip files listed in this endpoint have all of their contents internally listed at
chromedriver-${platform}/*
, rather than atbin/*
.At the very least, hopefully this is helpful to you as a starting point.