From 96fa28818cc8dba90f5e2dd365ccadedfc6bd4a0 Mon Sep 17 00:00:00 2001 From: Russell Martin Date: Sat, 1 Jul 2023 11:48:33 -0400 Subject: [PATCH] Ensure repo checkout is unshallow in RTD builds for SCM versioning --- .readthedocs.yaml | 8 +++++--- changes/1339.misc.rst | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 changes/1339.misc.rst diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 6ecce62c9..c13a6c3c9 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -2,15 +2,17 @@ # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details -# Required version: 2 -# Set the version of Python and other tools you might need build: os: ubuntu-22.04 tools: python: "3" jobs: + post_checkout: + # RTD defaults to a depth of 50 but Briefcase versioning may require + # much more git history to accurately determine the SCM version + - git fetch --unshallow pre_build: - tox -e docs-lint @@ -24,7 +26,7 @@ sphinx: formats: - pdf -# Optionally declare the Python requirements required to build your docs +# Install extras for build - dev is needed to run tox python: install: - method: pip diff --git a/changes/1339.misc.rst b/changes/1339.misc.rst new file mode 100644 index 000000000..0d8e356b7 --- /dev/null +++ b/changes/1339.misc.rst @@ -0,0 +1 @@ +The Briefcase repository checkout for Read the Docs builds is now made unshallow to ensure accurate SCM versioning.