"git@developer.sourcefind.cn:OpenDAS/torchani.git" did not exist on "eba1a18c203e1e67896051d729dc3fba0181c4ea"
Unverified Commit a5cedce2 authored by Matti Picus's avatar Matti Picus Committed by GitHub
Browse files

fix documentation version problems when new release is tagged (#5583)

* fix documentation version problems

* add missing import

* linting
parent d0dede0e
......@@ -1069,7 +1069,8 @@ jobs:
# Don't use "checkout" step since it uses ssh, which cannot git push
# https://circleci.com/docs/2.0/configuration-reference/#checkout
set -ex
tag=${CIRCLE_TAG:1:5}
# Change v1.12.1rc1 into 1.12 (only major.minor)
tag=$(echo $CIRCLE_TAG | sed -e 's/v*\([0-9]*\.[0-9]*\).*/\1/')
target=${tag:-main}
~/workspace/.circleci/build_docs/commit_docs.sh ~/workspace $target
......
......@@ -1069,7 +1069,8 @@ jobs:
# Don't use "checkout" step since it uses ssh, which cannot git push
# https://circleci.com/docs/2.0/configuration-reference/#checkout
set -ex
tag=${CIRCLE_TAG:1:5}
# Change v1.12.1rc1 into 1.12 (only major.minor)
tag=$(echo $CIRCLE_TAG | sed -e 's/v*\([0-9]*\.[0-9]*\).*/\1/')
target=${tag:-main}
~/workspace/.circleci/build_docs/commit_docs.sh ~/workspace $target
......
......@@ -20,6 +20,8 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import os
import pytorch_sphinx_theme
import torchvision
......@@ -80,11 +82,16 @@ author = "Torch Contributors"
# built documents.
#
# The short X.Y version.
# TODO: change to [:2] at v1.0
version = "main (" + torchvision.__version__ + " )"
# The full version, including alpha/beta/rc tags.
# TODO: verify this works as expected
release = "main"
VERSION = os.environ.get("VERSION", None)
if VERSION:
# Turn 1.11.0aHASH into 1.11 (major.minor only)
version = ".".join(version.split(".")[:2])
html_title = " ".join((project, version, "documentation"))
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment