|
7 | 7 | it expects to find newsfragments describing changes to that API. |
8 | 8 |
|
9 | 9 | If the `version.status` setting in config.toml is anything other than |
10 | | - "unstable", then it also expects to find a "release.yaml" file in /changelogs, |
11 | | - which contains: |
12 | | - - `tag`: Git tag for this release |
13 | | - - `date`: date of this release |
14 | | - It then renders this info a table, before the list of changes. |
| 10 | + "unstable", then it also expects to find additional settings under |
| 11 | + `version` in config.toml: |
| 12 | + - `major`: the major version number of the release |
| 13 | + - `minor`: the minor version number of the release |
| 14 | + - `release_date`: the date of the release |
| 15 | + |
| 16 | + The release tag is calculated as `v<major>.<minor>`; for example `v1.5`. |
| 17 | + |
| 18 | + It then renders this into a table displayed before the list of changes. |
15 | 19 |
|
16 | 20 | */}} |
17 | 21 |
|
18 | 22 | {{ $path := path.Join "changelogs" }} |
19 | 23 | {{ $status := .Site.Params.version.status }} |
| 24 | +{{ $release_tag := delimit (slice "v" .Site.Params.version.major "." .Site.Params.version.minor) "" }} |
20 | 25 |
|
21 | 26 | {{ if ne $status "unstable" }} |
22 | | -{{ $release_info := readFile (path.Join $path "release.yaml") | transform.Unmarshal }} |
23 | 27 | <table class="release-info"> |
24 | | -<tr><th>Git commit</th><td><a href="https://github.com/matrix-org/matrix-doc/tree/{{ $release_info.tag }}">https://github.com/matrix-org/matrix-doc/tree/{{ $release_info.tag }}</a></td> |
25 | | -<tr><th>Release date</th><td>{{ $release_info.date }}</td> |
| 28 | +<tr><th>Git commit</th><td><a href="https://github.com/matrix-org/matrix-doc/tree/{{ $release_tag }}">https://github.com/matrix-org/matrix-doc/tree/{{ $release_tag }}</a></td> |
| 29 | +<tr><th>Release date</th><td>{{ .Site.Params.version.release_date }}</td> |
26 | 30 | </table> |
27 | 31 | {{ end }} |
28 | 32 |
|
|
0 commit comments