Skip to content

Commit

Permalink
Fix auto Julia version in installation.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp authored Oct 10, 2024
1 parent e3b9fd5 commit 944ad29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ After working on your notebook (your code is autosaved when you run it), you wil
const run = f => f();
run(async () => {
const versions = await (await fetch(`https://julialang-s3.julialang.org/bin/versions.json`)).json()
const version_names = Object.keys(versions).sort().reverse()
const sortby = v => v.split("-")[0].split(".").map(parseFloat).reduce((a,b) => a*10000 + b)
const version_names = Object.keys(versions).sort((a,b) => sortby(a) - sortby(b)).reverse()
const stable = version_names.find(v => versions[v].stable)
console.log({stable})
const pkg_stable = /\\d+\\.\\d+/.exec(stable)[0]
Expand Down

0 comments on commit 944ad29

Please sign in to comment.