Skip to content

Commit d93209f

Browse files
committed
Esnure RTD builds pull full git repo so versions are properly computed by setuptools-scm on install
1 parent 2589ce0 commit d93209f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

readthedocs.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ build:
99
os: ubuntu-22.04
1010
tools:
1111
python: "3.11"
12+
jobs:
13+
# ensure full git repo is pulled so setuptools_scm gets versions correctly on install
14+
# https://docs.readthedocs.com/platform/stable/build-customization.html#unshallow-git-clone
15+
post_checkout:
16+
- git fetch --unshallow || true
17+
- git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*' || true
18+
- git fetch --all --tags || true
1219

1320
# Build documentation in the docs/ directory with Sphinx
1421
sphinx:

0 commit comments

Comments
 (0)