diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0647a62..91d061e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,8 @@ permissions: env: aws_region: us-east-1 s3_bucket: julialang2 - + JULIA_LTS: 1.10 + jobs: package-tests: name: Package tests diff --git a/README.md b/README.md index 1c65cbc..b237152 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ More info: https://github.com/JuliaLang/julia/issues/33817 To trigger a rebuild of the `versions.json` file and to upload it to S3, you need to manually trigger the `CI` workflow in this repo. You can either trigger it through the GitHub UI or via an authenticated HTTP request. +The current Julia LTS release is set via the `JULIA_LTS` variable in the [CI workflow](.github/workflows/CI.yml). + ### GitHub's UI ![grafik](https://user-images.githubusercontent.com/20866761/127783220-fd8167db-5051-4a18-b70a-ea42085a7cb5.png) diff --git a/src/VersionsJSONUtil.jl b/src/VersionsJSONUtil.jl index 837d348..191b7ae 100644 --- a/src/VersionsJSONUtil.jl +++ b/src/VersionsJSONUtil.jl @@ -122,6 +122,11 @@ function is_stable(v::VersionNumber) return v.prerelease == () && v.build == () end +function is_lts(v::VersionNumber) + lts = VersionNumber(ENV["JULIA_LTS"]) + return lts.major === v.major && lts.minor === v.minor && isempty(v.prerelease) +end + # Get list of tags from the Julia repo function get_tags() @info("Probing for tag list...") @@ -240,6 +245,12 @@ function main(out_path) rm(filepath) end end + @info("Adding lts entry...") + lts_version = maximum(filter(is_lts, keys(meta))) + push!(meta, "lts" => meta[lts_version]) + open(out_path, "w") do io + JSON.print(io, meta, 2) + end @info "Tried $(number_urls_tried) versions, successfully downloaded $(number_urls_success)" end