forked from cockroachdb/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar-releases.json
70 lines (68 loc) · 2.5 KB
/
sidebar-releases.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{% assign today = "today" | date: "%Y-%m-%d" %}
{% comment %} set today's date {% endcomment %}
{% assign v_prod = site.data.versions | where_exp: "v_prod", "v_prod.asst_supp_exp_date > today" | where_exp: "v_prod", "v_prod.release_date != 'N/A'" | sort: "release_date" | reverse | map: "major_version" %}
{% comment %} v_prod iterates through the list of major versions (e.g., v21.2) in _data/versions.csv and returns all releases within the assistance support period, sorted in reverse chronological order. We then pull only the major version name instead of the whole dictionary with map: "major_version" {% endcomment %}
{% assign v_test = site.data.versions | where_exp: "v_test", "v_test.release_date == 'N/A'" | sort: "release_date" | last | map: "major_version" %}
{% comment %} v_test iterates through the list of major versions in _data/versions.csv and returns the single latest testing version (if the release date is in the future or not otherwise specified). It's possible there is no testing release (in between GA of a version and the first alpha of the following version). {% endcomment %}
{
"title": "CockroachDB",
"items": [
{
"title": "All Releases",
"urls": [
"/releases/index.html"
]
},
{% for x in v_prod %} {% comment %} iterate through all supported versions {% endcomment %}
{
"title": "{{ x }}",
"urls": [
"/releases/{{ x }}.html"
]
},
{% endfor %}
{% if v_test[0] %} {% comment %} check if a testing version is available {% endcomment %}
{
"title": "Latest Testing Release",
"urls": [
{% comment %} check if a testing version is available and pull the latest testing version {% endcomment %}
"/releases/{{ v_test[0] }}.html"
]
},
{% endif %}
{
"title": "Release Support Policy",
"urls": [
"/releases/release-support-policy.html"
]
},
{
"title": "Known Limitations",
"urls": [
"/${VERSION}/known-limitations.html"
]
}
]
},
{
"title": "CockroachDB Cloud",
"urls": [
"/releases/cloud.html"
]
},
{
"title": "CockroachDB Kubernetes Operator",
"urls": [
"/releases/kubernetes-operator.html"
]
},
{% assign advisories = site.pages | where_exp: "advisories", "advisories.path contains 'advisories'" | where_exp: "advisories", "advisories.index != 'true'" %}
{
"title": "Technical Advisories",
"urls": [
"/advisories/index.html"
{% for x in advisories %}
,"{{ x.url }}"
{% endfor %}
]
}