Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions content/_layouts/corebaseline.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ layout: developersection

lts = site._generated[:core_tiers].stableCores
oldest_lts = lts[0]
all_lts = site._generated[:lts_releases].results.map { |v| v.version }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC use of this all_lts in next_lts_1 and previous_lts_highs rather than lts is the fix.


next_lts_1 = lts.select { |v| v =~ /[.]1$/ }[-1]
previous_lts_highs = lts.map { |v| v[0...-1] }.uniq[0...-1].map { |l| lts.select { |v| v.start_with?(l) }[-1] }
next_lts_1 = all_lts.select { |v| v =~ /[.]1$/ }[0]
# We assume that lts will contain at least one release of the previous LTS line, which is reasonable.
# Surely there's going to be at least one plugin depending on the old .1 by the time the next .1 is available.
previous_lts_highs = lts.map { |v| v[0...-1] }.uniq[0...-1].map { |l| all_lts.select { |v| v.start_with?(l) }[0] }

= page.content.gsub('PLACEHOLDER_NEWER_LTS_POINT_ONE', next_lts_1).gsub('PLACEHOLDER_RECENT_LTS_POINT_HIGHS', previous_lts_highs[-2...].join(' and ')).gsub('PLACEHOLDER_OLDER_LTS_POINT_HIGHS', previous_lts_highs[0...-2].join(' and ')).gsub('PLACEHOLDER_OLDEST_LTS', oldest_lts).gsub('PLACEHOLDER_OLDEST_WEEKLY', oldest_weekly).gsub('PLACEHOLDER_LATEST_SPLIT', latest_split)
6 changes: 6 additions & 0 deletions scripts/fetch-external-resources
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ RESOURCES = [
nil,
nil
],
[
'https://repo.jenkins-ci.org/api/search/versions?g=org.jenkins-ci.main&a=jenkins-core&repos=releases&v=?.*.?',
'content/_data/_generated/lts_releases.yml',
nil,
nil
],
[
'https://updates.jenkins.io/update-center.actual.json',
'content/_data/_generated/update_center.yml',
Expand Down