Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 9 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import os

import pytorch_sphinx_theme
import torchvision

Expand Down Expand Up @@ -80,11 +82,16 @@
# 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.
Expand Down