-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add site.release_info to Jekyll, retire config in _config_base.yml
Fixes DOC-8924
- Loading branch information
1 parent
b493faa
commit 5983f0b
Showing
33 changed files
with
103 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
major_version,release_date,maint_supp_exp_date,asst_supp_exp_date,previous_version | ||
v1.0,2017-05-10,2018-05-10,2018-11-10,N/A | ||
v1.1,2017-10-12,2018-10-12,2019-04-12,v1.0 | ||
v2.0,2018-04-04,2019-04-04,2019-10-04,v1.1 | ||
v2.1,2018-10-30,2019-10-30,2020-04-30,v2.0 | ||
v19.1,2019-04-30,2020-04-30,2020-10-30,v2.1 | ||
v19.2,2019-11-12,2020-11-12,2021-05-12,v19.1 | ||
v20.1,2020-05-12,2021-05-12,2021-11-12,v19.2 | ||
v20.2,2020-11-10,2021-11-10,2022-05-10,v20.1 | ||
v21.1,2021-05-18,2022-05-18,2022-11-18,v20.2 | ||
v21.2,2021-11-16,2022-11-16,2023-05-16,v21.1 | ||
v22.1,2022-05-24,2023-05-24,2023-11-24,v21.2 | ||
v22.2,2022-12-05,2023-12-05,2024-06-05,v22.1 | ||
v23.1,2023-05-15,2024-05-15,2024-11-15,v22.2 | ||
v23.2,N/A,N/A,N/A,v23.1 | ||
major_version,release_date,maint_supp_exp_date,asst_supp_exp_date,previous_version,crdb_branch_name | ||
v1.0,2017-05-10,2018-05-10,2018-11-10,N/A,release-1.0 | ||
v1.1,2017-10-12,2018-10-12,2019-04-12,v1.0,release-1.1 | ||
v2.0,2018-04-04,2019-04-04,2019-10-04,v1.1,release-2.0 | ||
v2.1,2018-10-30,2019-10-30,2020-04-30,v2.0,release-2.1 | ||
v19.1,2019-04-30,2020-04-30,2020-10-30,v2.1,release-19.1 | ||
v19.2,2019-11-12,2020-11-12,2021-05-12,v19.1,release-19.2 | ||
v20.1,2020-05-12,2021-05-12,2021-11-12,v19.2,release-20.1 | ||
v20.2,2020-11-10,2021-11-10,2022-05-10,v20.1,release-20.2 | ||
v21.1,2021-05-18,2022-05-18,2022-11-18,v20.2,release-21.1 | ||
v21.2,2021-11-16,2022-11-16,2023-05-16,v21.1,release-21.2 | ||
v22.1,2022-05-24,2023-05-24,2023-11-24,v21.2,release-22.1 | ||
v22.2,2022-12-05,2023-12-05,2024-06-05,v22.1,release-22.2 | ||
v23.1,2023-05-15,2024-05-15,2024-11-15,v22.2,release-23.1 | ||
v23.2,N/A,N/A,N/A,v23.1,master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
require 'csv' | ||
require 'yaml' | ||
|
||
module Jekyll | ||
class ReleaseInfoGenerator < Jekyll::Generator | ||
safe true | ||
priority -100 # Making sure it runs first | ||
|
||
def generate(site) | ||
# Step 1: Determine the parent directory of the current site | ||
parent_dir = File.expand_path('..', site.source) | ||
|
||
# Step 2: Construct the paths to versions.csv and releases.yml | ||
versions_path = File.join(parent_dir, "current/_data/versions.csv") | ||
releases_path = File.join(parent_dir, "current/_data/releases.yml") | ||
|
||
# Load versions and releases data | ||
versions_data = CSV.read(versions_path, headers: true) | ||
releases_data = YAML.load_file(releases_path) | ||
|
||
# Process the data | ||
release_info = {} | ||
versions_data.each do |version| | ||
major_version = version['major_version'] | ||
relevant_releases = releases_data.select { |release| release['major_version'] == major_version } | ||
latest_release = relevant_releases.max_by { |release| Date.parse(release['release_date']) } | ||
|
||
# Populate release info | ||
release_info[major_version] = { | ||
"version" => latest_release['release_name'], | ||
"release_name" => latest_release['release_name'], | ||
"major_version" => major_version, | ||
"build_time" => "#{latest_release['release_date']} 00:00:00", | ||
"go_version" => latest_release['go_version'], | ||
"docker_image" => latest_release['docker']['docker_image'], | ||
"release_type" => latest_release['release_type'], | ||
"crdb_branch_name" => version['crdb_branch_name'], | ||
"all_releases" => relevant_releases | ||
} | ||
end | ||
|
||
# Add the data to site object | ||
site.config['release_info'] = release_info | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.