-
Notifications
You must be signed in to change notification settings - Fork 60
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
Support latest version #267
Conversation
If we want to support this we need to do it for all dependencies we maintain (includes Gleam, rebar3, etc.), for feature parity. |
We're usually up-to-date with newer releases, and update the action to test those, where appropriate. |
src/setup-beam.js
Outdated
async function getLatestOTPVersions() { | ||
const response = await fetch("https://api.github.com/repos/erlang/otp/releases/latest") | ||
const json = await response.json(); | ||
return json.tag_name | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would look much better as a single function that took "org/repo" as input.
This states "Execute |
80d2b03
to
65f2ded
Compare
Thanks, @paulo-ferraz-oliveira I've cleaned this up. |
Should it be the latest stable version or include pre-releases? You need to fetch the latest version from the same source we get the other versions, otherwise the task will fail when there is a new release as it's tagged before the builds are available (at least for elixir and erlang). |
65f2ded
to
bec0e22
Compare
Do you have an example of this, and how long would it take to create a release before the builds are available?
The latest release does not include pre-releases. |
34fe792
to
faa1a92
Compare
faa1a92
to
187c797
Compare
You can check the
It depends on a lot of factors but normally 10-30min. Sometimes a build fails which requires manual fixing which can take hours to days. |
I've refactored to get the latest semver version from the build.text, which should solve the issue with builds not being available and the test suite passing locally for me. |
Let's say |
I realized I had a few bugs, so now I use Semver to resolve the latest Elixir and OTP builds. Furthermore, a bug in Semver prevented prereleases from being parsed, so I've updated the package. We can leverage Semver to parse that with its right-hand rule to parse OTP release by looking if a tag has otp in it. I tested this locally by changing the platform clauses from Linux to Darwin and Win32 to Darwin. I'm confident about the changes I committed. |
How does the semver library handle OTP versions that does not follow the semver specification, such as |
I got lost in this codebase and the review comments; I've opened #269, which is way simpler than I tried to do here. |
Description
This PR adds support for the latest version; I'm not super familiar with the codebase, so it's not the prettiest, and the tests are doomed to break when there is a new release.
@paulo-ferraz-oliveira Please let me know if this is the right direction.
Closes #266