-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathversion_list.py
More file actions
41 lines (39 loc) · 1.68 KB
/
Copy pathversion_list.py
File metadata and controls
41 lines (39 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
Define the versions we want to build
"""
import sys
import os
# The doc_builder package may live in a "doc-builder" subdir (as in repos where doc-builder is a
# submodule) or directly alongside this file (as in the doc-builder repo itself). Add whichever
# exists to sys.path so "doc_builder" is importable either way.
dir2add = os.path.join(os.path.dirname(__file__), "doc-builder")
if not os.path.exists(dir2add):
dir2add = os.path.dirname(__file__)
sys.path.insert(0, dir2add)
# pylint: disable=wrong-import-position,import-error
from doc_builder.docs_version import DocsVersion
from doc_builder.sys_utils import get_git_head_or_branch
# Branch name, tag, or commit SHA whose version of certain files we want to preserve
LATEST_REF = get_git_head_or_branch()
# List of version definitions
VERSION_LIST = [
# Always keep this one! You can change short_name and display_name if you want.
DocsVersion(
short_name="latest",
display_name="Latest development code",
landing_version=True,
ref=LATEST_REF,
),
# This is provided as an example of an additional, frozen version of documentation. Here,
# ref=... refers to the branch in the repo with the frozen docs. The short_name will show up in
# URL slugs and maybe elsewhere; it doesn't have to match the ref. display_name will be shown in
# the version picker drop-down.
# When you copy this into your repo, replace this with any and all frozen versions you wish to
# build.
DocsVersion(
short_name="dummy-version",
display_name="Dummy version",
ref="add-github-workflows-with-tmp-docs",
),
]
# End version definitions (keep this comment; Sphinx is looking for it)