← Back to issue list

docs: fix version numbering

View original Github issue

Metadata

Project
snapcraft
Number
#6295
Type
pull request
State
merged
Author
medubelko
Labels
—
Created
Updated
Closed

Current evaluation

Merged #6295 (commit 8456b4421), fixing docs version numbering to use Read the Docs branch metadata and keep local and RTD builds consistent.

Resolution: closed resolved

Reason: PR #6295 was approved and merged as commit 8456b4421. It updated docs/conf.py to derive the displayed release from READTHEDOCS_VERSION and READTHEDOCS_VERSION_TYPE.

Evaluated by: mr-cal-bot

No scores available.

Issue body

With the new release policy, the RTD version is based on branches, not tags. So, in the RTD environment we need to rely on different data, and the local builds should match it so the results are the same. Tested locally with the following RTD environment values. Main branch: ``` os.environ["READTHEDOCS_VERSION"] = "latest" os.environ["READTHEDOCS_VERSION_TYPE"] = "branch" os.environ["READTHEDOCS_GIT_IDENTIFIER"] = "main" ``` Hotfix branch: ``` os.environ["READTHEDOCS_VERSION"] = "9.0" os.environ["READTHEDOCS_VERSION_TYPE"] = "branch" os.environ["READTHEDOCS_GIT_IDENTIFIER"] = "hotfix/9.0" ``` PR branch: ``` os.environ["READTHEDOCS_VERSION"] = "1357" os.environ["READTHEDOCS_VERSION_TYPE"] = "external" os.environ["READTHEDOCS_GIT_IDENTIFIER"] = "my-fork/my-branch" ``` --- - [x] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md). - [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [x] I've successfully run `make lint && make test`. - [ ] I've added or updated any relevant documentation. - [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing. - [ ] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged #6295 (commit 8456b4421), fixing docs version numbering to use Read the Docs branch metadata and keep local and RTD builds consistent.
stealth/space-bunny-alpha — closed resolved Merged PR #6295 fixed documentation version numbering to use Read the Docs branch and version-type metadata, keeping local and RTD builds consistent.
qwen/qwen3.6-35b-a3b — — Merged documentation fix aligning ReadTheDocs version numbering with the new branch-based release policy. Incorporated reviewer feedback to refactor conditional logic and add comments. Updated version detection for main, hotfix, and PR branches.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/snapcraft#6313 (confidence 95%)

    Merged follow-up/backport carrying the same version-numbering correction to the release branch.

Related issues

Issue Project State Summary Similarity
#6313 docs: fix version numbering snapcraft merged Merged docs PR applying the #6295 patch, fixing docs version numbering in docs/conf.py via Read the Docs branch/version-type metadata; patch landed as commit 8456b4421.
88%
#588 docs: fix version in title starbase merged Merged docs fix (commit 23328cd): docs page titles now display major.minor version for local, PR and branch builds; only the 'latest' branch shows 'dev', following the RTD version slug simplification.
82%
#586 docs: fix incorrect version in documentation rockcraft merged Merged in #586 via commits 0ffc2395 and d5da1878, fixing #584 by fetching tags for Read the Docs and labeling unreleased docs as dev.
80%
#6387 docs: fix version on 'latest' snapcraft merged Merged PR #6387 via commit a67bdcd1f, fixing docs titles to show major.minor for local, PR, and branch builds while displaying dev for latest.
79%
#2830 docs: fix version string for 'latest' charmcraft merged Docs-only PR merged: RTD page titles now show major.minor for local/PR/branch builds, with 'latest' branch showing 'dev', following simplification of RTD version slugs (+2/-6 in one file).
79%
#1334 docs: fix version string on latest rockcraft merged Merged PR #1334 fixed docs version strings: local, PR, and branch builds show major.minor, while latest shows dev. Commit: b2bc69ce.
79%
#2831 docs: fix version string for 3.x charmcraft merged Merged #2831 to display the 3.x major/minor version in docs titles; the latest branch remains labeled dev after Read the Docs slug simplification.
78%
#4864 build(docs): fix version in rtd builds snapcraft merged PR #4864 merged as commit 3d05bf373: adds a post_checkout `git fetch --tags --unshallow` step to .readthedocs.yaml and installs snapcraft explicitly so docs show the correct version on RTD builds.
76%
#219 docs: fix readthedocs documentation generation craft-parts merged Merged PR #219 (commit c70294ee, merge 996ed24e) fixed RTD doc builds: added missing packages to the readthedocs env, indexed the changelog, and removed outdated python-apt from setup.py. Shipped in release 1.7.0.
75%
#1189 docs: format doc version as major.minor rockcraft merged Merged into main as fc0e073a, replacing #1185; documentation now renders release versions as major.minor and labels latest RTD builds as dev.
74%