How can I determine:
- the latest stable Julia version
- the latest Julia release
- the latest Julia pre-release
on github?
I can do:
ufechner@ufryzen:~$ juliaup list | grep release
release 1.11.4+0.x64.linux.gnu
release~x64 1.11.4+0.x64.linux.gnu
release~x86 1.11.4+0.x86.linux.gnu
which is already nice, but I don’t have the version number string yet.
I cannot do:
juliaup list | grep pre
This gives me only version 0.6 as pre-release.
1 Like
Thanks for the link. Unfortunately it doesn’t solve my problem. I want to test with the latest release and the latest pre-release, but often both are the same, and then I don’t want to run the same job twice.
So I need to test if the pre-release is the same as the release. There is no job yet that can do that, so I have to program that myself. But I can program that only if I found a reliable way to determine the version number both of the latest release and of the latest pre-release.
Not really. I do not know how to extract the version number of the latest Julia version and the latest pre release from the .json file.
Perplexity suggested:
echo "latest=$(jq -r '.latest.version' <<< "$versions")"
which does not work, the result is empty.
This seems to work right now:
using Downloads, JSON
j = Downloads.download("https://julialang-s3.julialang.org/bin/versions.json", IOBuffer()) |> seekstart |> JSON.parse
lateststable = (keys(j) |> filter(contains(r"^[0-9]+\.[0-9]+\.[0-9]+$")) .|> VersionNumber |> sort)[end]
latestpre = (keys(j) |> filter(contains(r"^[0-9]+\.[0-9]+\.[0-9]+-")) .|> VersionNumber |> sort)[end]