Fixed issue when a tag is modified on the remote server

This commit is contained in:
Youen 2023-05-29 18:02:20 +00:00
parent 8e564c1ef4
commit 9db1653d72

View File

@ -82,7 +82,7 @@ class Document:
if multiversion_build:
# also fetch all branches and tags, so that sphinx-multiversion knows what versions exist and can pull them
cmd.append(['git', 'fetch', '--all'])
cmd.append(['git', 'fetch', '--all', '--tags', '--force'])
cmd.append(['bash', '-c', 'for BRANCH in $(git branch -a | grep remotes | grep -v HEAD | grep -v master); do git branch --track "${BRANCH#remotes/origin/}" "${BRANCH}" || git branch -f "${BRANCH#remotes/origin/}" -t "${BRANCH}"; done'])
# build the HTML version