diff options
| -rw-r--r-- | documentation/poky.yaml.in | 11 | ||||
| -rwxr-xr-x | documentation/set_versions.py | 16 |
2 files changed, 25 insertions, 2 deletions
diff --git a/documentation/poky.yaml.in b/documentation/poky.yaml.in index 0e923f0a43..9c03e9959b 100644 --- a/documentation/poky.yaml.in +++ b/documentation/poky.yaml.in | |||
| @@ -2,13 +2,22 @@ | |||
| 2 | # Macros used in the documentation | 2 | # Macros used in the documentation |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | # The DISTRO variable represents the current docs version. It should be used | ||
| 6 | # when referring to the current docs version. See also DISTRO_LATEST_TAG. | ||
| 5 | DISTRO : "5.0" | 7 | DISTRO : "5.0" |
| 8 | # The DISTRO_LATEST_TAG represents the latest tag on the current branch. It | ||
| 9 | # should be used in HTTP link referring to the current docs version. In these | ||
| 10 | # cases, the DISTRO may point to A.B.999 which does not exist (just used to | ||
| 11 | # represent the latest HEAD revision on the branch). DISTRO_LATEST_TAG should | ||
| 12 | # always point to an existing tag. | ||
| 13 | DISTRO_LATEST_TAG : "5.0" | ||
| 6 | DISTRO_NAME_NO_CAP : "scarthgap" | 14 | DISTRO_NAME_NO_CAP : "scarthgap" |
| 7 | DISTRO_NAME : "Scarthgap" | 15 | DISTRO_NAME : "Scarthgap" |
| 8 | DISTRO_NAME_NO_CAP_MINUS_ONE : "nanbield" | 16 | DISTRO_NAME_NO_CAP_MINUS_ONE : "nanbield" |
| 9 | DISTRO_NAME_NO_CAP_LTS : "scarthgap" | 17 | DISTRO_NAME_NO_CAP_LTS : "scarthgap" |
| 10 | YOCTO_DOC_VERSION : "5.0" | 18 | YOCTO_DOC_VERSION : "5.0" |
| 11 | DISTRO_REL_TAG : "yocto-5.0" | 19 | DISTRO_REL_TAG : "yocto-$DISTRO;" |
| 20 | DISTRO_REL_LATEST_TAG : "yocto-&DISTRO_LATEST_TAG;" | ||
| 12 | DOCCONF_VERSION : "dev" | 21 | DOCCONF_VERSION : "dev" |
| 13 | BITBAKE_SERIES : "" | 22 | BITBAKE_SERIES : "" |
| 14 | YOCTO_DL_URL : "https://downloads.yoctoproject.org" | 23 | YOCTO_DL_URL : "https://downloads.yoctoproject.org" |
diff --git a/documentation/set_versions.py b/documentation/set_versions.py index dec0780834..820bd64036 100755 --- a/documentation/set_versions.py +++ b/documentation/set_versions.py | |||
| @@ -168,17 +168,29 @@ series = [k for k in release_series] | |||
| 168 | previousseries = series[series.index(ourseries)+1:] or [""] | 168 | previousseries = series[series.index(ourseries)+1:] or [""] |
| 169 | lastlts = [k for k in previousseries if k in ltsseries] or "dunfell" | 169 | lastlts = [k for k in previousseries if k in ltsseries] or "dunfell" |
| 170 | 170 | ||
| 171 | latestreltag = subprocess.run(["git", "describe", "--abbrev=0", "--tags", "--match", "yocto-*"], capture_output=True, text=True).stdout | ||
| 172 | latestreltag = latestreltag.strip() | ||
| 173 | if latestreltag: | ||
| 174 | if latestreltag.startswith("yocto-"): | ||
| 175 | latesttag = latestreltag[6:] | ||
| 176 | else: | ||
| 177 | # fallback on the calculated version | ||
| 178 | print("Did not find a tag with 'git describe', falling back to %s" % ourversion) | ||
| 179 | latestreltag = "yocto-" + ourversion | ||
| 180 | latesttag = ourversion | ||
| 181 | |||
| 171 | print("Version calculated to be %s" % ourversion) | 182 | print("Version calculated to be %s" % ourversion) |
| 183 | print("Latest release tag found is %s" % latestreltag) | ||
| 172 | print("Release series calculated to be %s" % ourseries) | 184 | print("Release series calculated to be %s" % ourseries) |
| 173 | 185 | ||
| 174 | replacements = { | 186 | replacements = { |
| 175 | "DISTRO" : ourversion, | 187 | "DISTRO" : ourversion, |
| 188 | "DISTRO_LATEST_TAG": latesttag, | ||
| 176 | "DISTRO_NAME_NO_CAP" : ourseries, | 189 | "DISTRO_NAME_NO_CAP" : ourseries, |
| 177 | "DISTRO_NAME" : ourseries.capitalize(), | 190 | "DISTRO_NAME" : ourseries.capitalize(), |
| 178 | "DISTRO_NAME_NO_CAP_MINUS_ONE" : previousseries[0], | 191 | "DISTRO_NAME_NO_CAP_MINUS_ONE" : previousseries[0], |
| 179 | "DISTRO_NAME_NO_CAP_LTS" : lastlts[0], | 192 | "DISTRO_NAME_NO_CAP_LTS" : lastlts[0], |
| 180 | "YOCTO_DOC_VERSION" : ourversion, | 193 | "YOCTO_DOC_VERSION" : ourversion, |
| 181 | "DISTRO_REL_TAG" : "yocto-" + ourversion, | ||
| 182 | "DOCCONF_VERSION" : docconfver, | 194 | "DOCCONF_VERSION" : docconfver, |
| 183 | "BITBAKE_SERIES" : bitbakeversion, | 195 | "BITBAKE_SERIES" : bitbakeversion, |
| 184 | } | 196 | } |
| @@ -316,3 +328,5 @@ with open('releases.rst', 'w') as f: | |||
| 316 | if tag == release_series[series] or tag.startswith('%s.' % release_series[series]): | 328 | if tag == release_series[series] or tag.startswith('%s.' % release_series[series]): |
| 317 | f.write('- :yocto_docs:`%s Documentation </%s>`\n' % (tag, tag)) | 329 | f.write('- :yocto_docs:`%s Documentation </%s>`\n' % (tag, tag)) |
| 318 | f.write('\n') | 330 | f.write('\n') |
| 331 | |||
| 332 | |||
