diff options
| author | Quentin Schulz <quentin.schulz@theobroma-systems.com> | 2022-07-19 10:12:12 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-07-20 14:25:01 +0100 |
| commit | 9926c0bf2f272d386911639635885fc8c55abc14 (patch) | |
| tree | c7e738e71765fb364b5507baf4a8dfff11ae6d61 | |
| parent | 102278a77f01fe0363f9a95b2c07fd15811a7b4a (diff) | |
| download | poky-9926c0bf2f272d386911639635885fc8c55abc14.tar.gz | |
docs: auto-generate releases.rst
In order to maintain one less file, let's auto-generate the releases.rst
file which contains a link for each release ever released.
This gets auto-generated by checking the tags available in this git repo
and adding a link for each that exists.
A few tags are notoriously missing from this git repo and they are
manually listed then, until the tags are pushed for the appropriate
commit.
Cc: Quentin Schulz <foss@0leil.net>
(From yocto-docs rev: c581eda3f87390b3e5223daff74d0ed6567ec51a)
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | documentation/.gitignore | 1 | ||||
| -rw-r--r-- | documentation/releases.rst | 251 | ||||
| -rwxr-xr-x | documentation/set_versions.py | 77 |
3 files changed, 78 insertions, 251 deletions
diff --git a/documentation/.gitignore b/documentation/.gitignore index 096b97ec28..4e077d03fb 100644 --- a/documentation/.gitignore +++ b/documentation/.gitignore | |||
| @@ -2,6 +2,7 @@ _build/ | |||
| 2 | Pipfile.lock | 2 | Pipfile.lock |
| 3 | poky.yaml | 3 | poky.yaml |
| 4 | sphinx-static/switchers.js | 4 | sphinx-static/switchers.js |
| 5 | releases.rst | ||
| 5 | .vscode/ | 6 | .vscode/ |
| 6 | */svg/*.png | 7 | */svg/*.png |
| 7 | */svg/*.pdf | 8 | */svg/*.pdf |
diff --git a/documentation/releases.rst b/documentation/releases.rst deleted file mode 100644 index b2b4486158..0000000000 --- a/documentation/releases.rst +++ /dev/null | |||
| @@ -1,251 +0,0 @@ | |||
| 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK | ||
| 2 | |||
| 3 | .. | ||
| 4 | NOTE FOR RELEASE MAINTAINERS: | ||
| 5 | This file only needs updating in the development release ("master" branch) | ||
| 6 | When documentation for stable releases is built, | ||
| 7 | the latest version from "master" is used | ||
| 8 | by https://git.yoctoproject.org/yocto-autobuilder-helper/tree/scripts/run-docs-build | ||
| 9 | |||
| 10 | =========================== | ||
| 11 | Supported Release Manuals | ||
| 12 | =========================== | ||
| 13 | |||
| 14 | ****************************** | ||
| 15 | Release Series 4.0 (kirkstone) | ||
| 16 | ****************************** | ||
| 17 | |||
| 18 | - :yocto_docs:`4.0 Documentation </4.0>` | ||
| 19 | - :yocto_docs:`4.0.1 Documentation </4.0.1>` | ||
| 20 | - :yocto_docs:`4.0.2 Documentation </4.0.2>` | ||
| 21 | |||
| 22 | **************************** | ||
| 23 | Release Series 3.1 (dunfell) | ||
| 24 | **************************** | ||
| 25 | |||
| 26 | - :yocto_docs:`3.1 Documentation </3.1>` | ||
| 27 | - :yocto_docs:`3.1.1 Documentation </3.1.1>` | ||
| 28 | - :yocto_docs:`3.1.2 Documentation </3.1.2>` | ||
| 29 | - :yocto_docs:`3.1.3 Documentation </3.1.3>` | ||
| 30 | - :yocto_docs:`3.1.4 Documentation </3.1.4>` | ||
| 31 | - :yocto_docs:`3.1.5 Documentation </3.1.5>` | ||
| 32 | - :yocto_docs:`3.1.6 Documentation </3.1.6>` | ||
| 33 | - :yocto_docs:`3.1.7 Documentation </3.1.7>` | ||
| 34 | - :yocto_docs:`3.1.8 Documentation </3.1.8>` | ||
| 35 | - :yocto_docs:`3.1.9 Documentation </3.1.9>` | ||
| 36 | - :yocto_docs:`3.1.10 Documentation </3.1.10>` | ||
| 37 | - :yocto_docs:`3.1.11 Documentation </3.1.11>` | ||
| 38 | - :yocto_docs:`3.1.12 Documentation </3.1.12>` | ||
| 39 | - :yocto_docs:`3.1.13 Documentation </3.1.13>` | ||
| 40 | - :yocto_docs:`3.1.14 Documentation </3.1.14>` | ||
| 41 | - :yocto_docs:`3.1.15 Documentation </3.1.15>` | ||
| 42 | - :yocto_docs:`3.1.16 Documentation </3.1.16>` | ||
| 43 | - :yocto_docs:`3.1.17 Documentation </3.1.17>` | ||
| 44 | |||
| 45 | ========================== | ||
| 46 | Outdated Release Manuals | ||
| 47 | ========================== | ||
| 48 | |||
| 49 | ****************************** | ||
| 50 | Release Series 3.4 (honister) | ||
| 51 | ****************************** | ||
| 52 | |||
| 53 | - :yocto_docs:`3.4 Documentation </3.4>` | ||
| 54 | - :yocto_docs:`3.4.1 Documentation </3.4.1>` | ||
| 55 | - :yocto_docs:`3.4.2 Documentation </3.4.2>` | ||
| 56 | - :yocto_docs:`3.4.3 Documentation </3.4.3>` | ||
| 57 | - :yocto_docs:`3.4.4 Documentation </3.4.4>` | ||
| 58 | |||
| 59 | ****************************** | ||
| 60 | Release Series 3.3 (hardknott) | ||
| 61 | ****************************** | ||
| 62 | |||
| 63 | - :yocto_docs:`3.3 Documentation </3.3>` | ||
| 64 | - :yocto_docs:`3.3.1 Documentation </3.3.1>` | ||
| 65 | - :yocto_docs:`3.3.2 Documentation </3.3.2>` | ||
| 66 | - :yocto_docs:`3.3.3 Documentation </3.3.3>` | ||
| 67 | - :yocto_docs:`3.3.4 Documentation </3.3.4>` | ||
| 68 | - :yocto_docs:`3.3.5 Documentation </3.3.5>` | ||
| 69 | - :yocto_docs:`3.3.6 Documentation </3.3.6>` | ||
| 70 | |||
| 71 | ******************************* | ||
| 72 | Release Series 3.2 (gatesgarth) | ||
| 73 | ******************************* | ||
| 74 | |||
| 75 | - :yocto_docs:`3.2 Documentation </3.2>` | ||
| 76 | - :yocto_docs:`3.2.1 Documentation </3.2.1>` | ||
| 77 | - :yocto_docs:`3.2.2 Documentation </3.2.2>` | ||
| 78 | - :yocto_docs:`3.2.3 Documentation </3.2.3>` | ||
| 79 | - :yocto_docs:`3.2.4 Documentation </3.2.4>` | ||
| 80 | |||
| 81 | ************************* | ||
| 82 | Release Series 3.0 (zeus) | ||
| 83 | ************************* | ||
| 84 | |||
| 85 | - :yocto_docs:`3.0 Documentation </3.0>` | ||
| 86 | - :yocto_docs:`3.0.1 Documentation </3.0.1>` | ||
| 87 | - :yocto_docs:`3.0.2 Documentation </3.0.2>` | ||
| 88 | - :yocto_docs:`3.0.3 Documentation </3.0.3>` | ||
| 89 | - :yocto_docs:`3.0.4 Documentation </3.0.4>` | ||
| 90 | |||
| 91 | **************************** | ||
| 92 | Release Series 2.7 (warrior) | ||
| 93 | **************************** | ||
| 94 | |||
| 95 | - :yocto_docs:`2.7 Documentation </2.7>` | ||
| 96 | - :yocto_docs:`2.7.1 Documentation </2.7.1>` | ||
| 97 | - :yocto_docs:`2.7.2 Documentation </2.7.2>` | ||
| 98 | - :yocto_docs:`2.7.3 Documentation </2.7.3>` | ||
| 99 | - :yocto_docs:`2.7.4 Documentation </2.7.4>` | ||
| 100 | |||
| 101 | ************************* | ||
| 102 | Release Series 2.6 (thud) | ||
| 103 | ************************* | ||
| 104 | |||
| 105 | - :yocto_docs:`2.6 Documentation </2.6>` | ||
| 106 | - :yocto_docs:`2.6.1 Documentation </2.6.1>` | ||
| 107 | - :yocto_docs:`2.6.2 Documentation </2.6.2>` | ||
| 108 | - :yocto_docs:`2.6.3 Documentation </2.6.3>` | ||
| 109 | - :yocto_docs:`2.6.4 Documentation </2.6.4>` | ||
| 110 | |||
| 111 | ************************* | ||
| 112 | Release Series 2.5 (sumo) | ||
| 113 | ************************* | ||
| 114 | |||
| 115 | - :yocto_docs:`2.5 Documentation </2.5>` | ||
| 116 | - :yocto_docs:`2.5.1 Documentation </2.5.1>` | ||
| 117 | - :yocto_docs:`2.5.2 Documentation </2.5.2>` | ||
| 118 | - :yocto_docs:`2.5.3 Documentation </2.5.3>` | ||
| 119 | |||
| 120 | ************************** | ||
| 121 | Release Series 2.4 (rocko) | ||
| 122 | ************************** | ||
| 123 | |||
| 124 | - :yocto_docs:`2.4 Documentation </2.4>` | ||
| 125 | - :yocto_docs:`2.4.1 Documentation </2.4.1>` | ||
| 126 | - :yocto_docs:`2.4.2 Documentation </2.4.2>` | ||
| 127 | - :yocto_docs:`2.4.3 Documentation </2.4.3>` | ||
| 128 | - :yocto_docs:`2.4.4 Documentation </2.4.4>` | ||
| 129 | |||
| 130 | ************************* | ||
| 131 | Release Series 2.3 (pyro) | ||
| 132 | ************************* | ||
| 133 | |||
| 134 | - :yocto_docs:`2.3 Documentation </2.3>` | ||
| 135 | - :yocto_docs:`2.3.1 Documentation </2.3.1>` | ||
| 136 | - :yocto_docs:`2.3.2 Documentation </2.3.2>` | ||
| 137 | - :yocto_docs:`2.3.3 Documentation </2.3.3>` | ||
| 138 | - :yocto_docs:`2.3.4 Documentation </2.3.4>` | ||
| 139 | |||
| 140 | ************************** | ||
| 141 | Release Series 2.2 (morty) | ||
| 142 | ************************** | ||
| 143 | |||
| 144 | - :yocto_docs:`2.2 Documentation </2.2>` | ||
| 145 | - :yocto_docs:`2.2.1 Documentation </2.2.1>` | ||
| 146 | - :yocto_docs:`2.2.2 Documentation </2.2.2>` | ||
| 147 | - :yocto_docs:`2.2.3 Documentation </2.2.3>` | ||
| 148 | |||
| 149 | **************************** | ||
| 150 | Release Series 2.1 (krogoth) | ||
| 151 | **************************** | ||
| 152 | |||
| 153 | - :yocto_docs:`2.1 Documentation </2.1>` | ||
| 154 | - :yocto_docs:`2.1.1 Documentation </2.1.1>` | ||
| 155 | - :yocto_docs:`2.1.2 Documentation </2.1.2>` | ||
| 156 | - :yocto_docs:`2.1.3 Documentation </2.1.3>` | ||
| 157 | |||
| 158 | *************************** | ||
| 159 | Release Series 2.0 (jethro) | ||
| 160 | *************************** | ||
| 161 | |||
| 162 | - :yocto_docs:`1.9 Documentation </1.9>` | ||
| 163 | - :yocto_docs:`2.0 Documentation </2.0>` | ||
| 164 | - :yocto_docs:`2.0.1 Documentation </2.0.1>` | ||
| 165 | - :yocto_docs:`2.0.2 Documentation </2.0.2>` | ||
| 166 | - :yocto_docs:`2.0.3 Documentation </2.0.3>` | ||
| 167 | |||
| 168 | ************************* | ||
| 169 | Release Series 1.8 (fido) | ||
| 170 | ************************* | ||
| 171 | |||
| 172 | - :yocto_docs:`1.8 Documentation </1.8>` | ||
| 173 | - :yocto_docs:`1.8.1 Documentation </1.8.1>` | ||
| 174 | - :yocto_docs:`1.8.2 Documentation </1.8.2>` | ||
| 175 | |||
| 176 | ************************** | ||
| 177 | Release Series 1.7 (dizzy) | ||
| 178 | ************************** | ||
| 179 | |||
| 180 | - :yocto_docs:`1.7 Documentation </1.7>` | ||
| 181 | - :yocto_docs:`1.7.1 Documentation </1.7.1>` | ||
| 182 | - :yocto_docs:`1.7.2 Documentation </1.7.2>` | ||
| 183 | - :yocto_docs:`1.7.3 Documentation </1.7.3>` | ||
| 184 | |||
| 185 | ************************** | ||
| 186 | Release Series 1.6 (daisy) | ||
| 187 | ************************** | ||
| 188 | |||
| 189 | - :yocto_docs:`1.6 Documentation </1.6>` | ||
| 190 | - :yocto_docs:`1.6.1 Documentation </1.6.1>` | ||
| 191 | - :yocto_docs:`1.6.2 Documentation </1.6.2>` | ||
| 192 | - :yocto_docs:`1.6.3 Documentation </1.6.3>` | ||
| 193 | |||
| 194 | ************************* | ||
| 195 | Release Series 1.5 (dora) | ||
| 196 | ************************* | ||
| 197 | |||
| 198 | - :yocto_docs:`1.5 Documentation </1.5>` | ||
| 199 | - :yocto_docs:`1.5.1 Documentation </1.5.1>` | ||
| 200 | - :yocto_docs:`1.5.2 Documentation </1.5.2>` | ||
| 201 | - :yocto_docs:`1.5.3 Documentation </1.5.3>` | ||
| 202 | - :yocto_docs:`1.5.4 Documentation </1.5.4>` | ||
| 203 | |||
| 204 | ************************** | ||
| 205 | Release Series 1.4 (dylan) | ||
| 206 | ************************** | ||
| 207 | |||
| 208 | - :yocto_docs:`1.4 Documentation </1.4>` | ||
| 209 | - :yocto_docs:`1.4.1 Documentation </1.4.1>` | ||
| 210 | - :yocto_docs:`1.4.2 Documentation </1.4.2>` | ||
| 211 | - :yocto_docs:`1.4.3 Documentation </1.4.3>` | ||
| 212 | - :yocto_docs:`1.4.4 Documentation </1.4.4>` | ||
| 213 | - :yocto_docs:`1.4.5 Documentation </1.4.5>` | ||
| 214 | |||
| 215 | ************************** | ||
| 216 | Release Series 1.3 (danny) | ||
| 217 | ************************** | ||
| 218 | |||
| 219 | - :yocto_docs:`1.3 Documentation </1.3>` | ||
| 220 | - :yocto_docs:`1.3.1 Documentation </1.3.1>` | ||
| 221 | - :yocto_docs:`1.3.2 Documentation </1.3.2>` | ||
| 222 | |||
| 223 | *************************** | ||
| 224 | Release Series 1.2 (denzil) | ||
| 225 | *************************** | ||
| 226 | |||
| 227 | - :yocto_docs:`1.2 Documentation </1.2>` | ||
| 228 | - :yocto_docs:`1.2.1 Documentation </1.2.1>` | ||
| 229 | - :yocto_docs:`1.2.2 Documentation </1.2.2>` | ||
| 230 | |||
| 231 | *************************** | ||
| 232 | Release Series 1.1 (edison) | ||
| 233 | *************************** | ||
| 234 | |||
| 235 | - :yocto_docs:`1.1 Documentation </1.1>` | ||
| 236 | - :yocto_docs:`1.1.1 Documentation </1.1.1>` | ||
| 237 | - :yocto_docs:`1.1.2 Documentation </1.1.2>` | ||
| 238 | |||
| 239 | **************************** | ||
| 240 | Release Series 1.0 (bernard) | ||
| 241 | **************************** | ||
| 242 | |||
| 243 | - :yocto_docs:`1.0 Documentation </1.0>` | ||
| 244 | - :yocto_docs:`1.0.1 Documentation </1.0.1>` | ||
| 245 | - :yocto_docs:`1.0.2 Documentation </1.0.2>` | ||
| 246 | |||
| 247 | **************************** | ||
| 248 | Release Series 0.9 (laverne) | ||
| 249 | **************************** | ||
| 250 | |||
| 251 | - :yocto_docs:`0.9 Documentation </0.9>` | ||
diff --git a/documentation/set_versions.py b/documentation/set_versions.py index a7ceb3455a..ddf70851cb 100755 --- a/documentation/set_versions.py +++ b/documentation/set_versions.py | |||
| @@ -1,9 +1,11 @@ | |||
| 1 | #!/usr/bin/env python3 | 1 | #!/usr/bin/env python3 |
| 2 | # | 2 | # |
| 3 | # Add version information to poky.yaml based upon current git branch/tags | 3 | # Add version information to poky.yaml based upon current git branch/tags |
| 4 | # Also generate the list of available manuals (releases.rst file) | ||
| 4 | # | 5 | # |
| 5 | # Copyright Linux Foundation | 6 | # Copyright Linux Foundation |
| 6 | # Author: Richard Purdie <richard.purdie@linuxfoundation.org> | 7 | # Author: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 8 | # Author: Quentin Schulz <foss@0leil.net> | ||
| 7 | # | 9 | # |
| 8 | # SPDX-License-Identifier: MIT | 10 | # SPDX-License-Identifier: MIT |
| 9 | # | 11 | # |
| @@ -14,6 +16,7 @@ import collections | |||
| 14 | import sys | 16 | import sys |
| 15 | import os | 17 | import os |
| 16 | import itertools | 18 | import itertools |
| 19 | import re | ||
| 17 | 20 | ||
| 18 | ourversion = None | 21 | ourversion = None |
| 19 | if len(sys.argv) == 2: | 22 | if len(sys.argv) == 2: |
| @@ -231,3 +234,77 @@ with open("sphinx-static/switchers.js.in", "r") as r, open("sphinx-static/switch | |||
| 231 | 234 | ||
| 232 | print("switchers.js generated from switchers.js.in") | 235 | print("switchers.js generated from switchers.js.in") |
| 233 | 236 | ||
| 237 | # generate releases.rst | ||
| 238 | |||
| 239 | # list missing tags in yocto-docs | ||
| 240 | missing_tags = [ | ||
| 241 | 'yocto-0.9', | ||
| 242 | 'yocto-1.0', 'yocto-1.0.1', | ||
| 243 | 'yocto-1.1', 'yocto-1.1.1', | ||
| 244 | 'yocto-1.2', | ||
| 245 | 'yocto-1.4.4', 'yocto-1.4.5', | ||
| 246 | 'yocto-1.5', 'yocto-1.5.2', 'yocto-1.5.3', 'yocto-1.5.4', | ||
| 247 | 'yocto-1.6', 'yocto-1.6.1', 'yocto-1.6.2', | ||
| 248 | 'yocto-1.7', 'yocto-1.7.1', | ||
| 249 | 'yocto-1.9', | ||
| 250 | 'yocto-2.5.3', | ||
| 251 | 'yocto-3.1', 'yocto-3.1.1', 'yocto-3.1.2', 'yocto-3.1.3', | ||
| 252 | ] | ||
| 253 | |||
| 254 | semver = re.compile(r'yocto-(\d+)\.(\d+)(?:\.)?(\d*)') | ||
| 255 | |||
| 256 | # git is able to properly order semver versions but not python | ||
| 257 | # instead of adding a dependency on semver module, let's convert the version | ||
| 258 | # into a decimal number, e.g. 11.23.1 will be 112301 and 1.5 will be 010500 so | ||
| 259 | # it can be used as a key for the sorting algorithm. | ||
| 260 | # This can be removed once all the old tags are re-created. | ||
| 261 | def tag_to_semver_like(v): | ||
| 262 | v_semver = semver.search(v) | ||
| 263 | v_maj, v_min, v_patch = v_semver.groups('0') | ||
| 264 | return int("{:0>2}{:0>2}{:0>2}".format(v_maj, v_min, v_patch), 10) | ||
| 265 | |||
| 266 | yocto_tags = subprocess.run(["git", "tag", "--list", "--sort=version:refname", "yocto-*"], capture_output=True, text=True).stdout | ||
| 267 | yocto_tags = sorted(yocto_tags.split() + missing_tags, key=tag_to_semver_like) | ||
| 268 | tags = [tag[6:] for tag in yocto_tags] | ||
| 269 | |||
| 270 | with open('releases.rst', 'w') as f: | ||
| 271 | f.write('===========================\n') | ||
| 272 | f.write(' Supported Release Manuals\n') | ||
| 273 | f.write('===========================\n') | ||
| 274 | f.write('\n') | ||
| 275 | |||
| 276 | for activerelease in activereleases: | ||
| 277 | title = "Release Series %s (%s)" % (release_series[activerelease], activerelease) | ||
| 278 | f.write('*' * len(title) + '\n') | ||
| 279 | f.write(title + '\n') | ||
| 280 | f.write('*' * len(title) + '\n') | ||
| 281 | f.write('\n') | ||
| 282 | |||
| 283 | for tag in tags: | ||
| 284 | if tag == release_series[activerelease] or tag.startswith('%s.' % release_series[activerelease]): | ||
| 285 | f.write('- :yocto_docs:`%s Documentation </%s>`\n' % (tag, tag)) | ||
| 286 | f.write('\n') | ||
| 287 | |||
| 288 | f.write('==========================\n') | ||
| 289 | f.write(' Outdated Release Manuals\n') | ||
| 290 | f.write('==========================\n') | ||
| 291 | f.write('\n') | ||
| 292 | |||
| 293 | for series in release_series: | ||
| 294 | if series == devbranch or series in activereleases: | ||
| 295 | continue | ||
| 296 | |||
| 297 | if series == "jethro-pre": | ||
| 298 | continue | ||
| 299 | |||
| 300 | title = "Release Series %s (%s)" % (release_series[series], series) | ||
| 301 | f.write('*' * len(title) + '\n') | ||
| 302 | f.write(title + '\n') | ||
| 303 | f.write('*' * len(title) + '\n') | ||
| 304 | f.write('\n') | ||
| 305 | if series == "jethro": | ||
| 306 | f.write('- :yocto_docs:`1.9 Documentation </1.9>`\n') | ||
| 307 | for tag in tags: | ||
| 308 | if tag == release_series[series] or tag.startswith('%s.' % release_series[series]): | ||
| 309 | f.write('- :yocto_docs:`%s Documentation </%s>`\n' % (tag, tag)) | ||
| 310 | f.write('\n') | ||
