docs(components): present all v2 GCPC versions on all pages of v2 GCPC docs
PiperOrigin-RevId: 549745616
This commit is contained in:
parent
b834c8a5ee
commit
1619f2c0b6
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
# read the current version from environment variable
|
||||
GCPC_VERSION=$1
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
|
||||
# check if jq is installed
|
||||
if ! command -v jq &> /dev/null
|
||||
then
|
||||
echo "jq could not be found"
|
||||
echo "Please install jq using the following command:"
|
||||
echo "sudo apt-get install jq"
|
||||
exit
|
||||
fi
|
||||
|
||||
# create a new JSON object
|
||||
new_version=$(cat <<EOF
|
||||
{
|
||||
"version": "https://google-cloud-pipeline-components.readthedocs.io/en/google-cloud-pipeline-components-${GCPC_VERSION}",
|
||||
"title": "${GCPC_VERSION}",
|
||||
"aliases": []
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
# append the new version to the existing JSON file
|
||||
jq ". = [$new_version] + ." $SCRIPT_DIR/source/versions.json > $SCRIPT_DIR/temp.json && mv $SCRIPT_DIR/temp.json $SCRIPT_DIR/source/versions.json
|
||||
|
|
@ -112,23 +112,6 @@ Output = OutputClass()
|
|||
|
||||
dsl.Output = Output
|
||||
|
||||
# order from earliest to latest
|
||||
# start with 2.0.0b3, which is the first time we're using the new theme
|
||||
V2_DROPDOWN_VERSIONS = [
|
||||
'2.0.0b3',
|
||||
'2.0.0b4',
|
||||
'2.0.0b5',
|
||||
'2.0.0',
|
||||
'2.1.0',
|
||||
]
|
||||
|
||||
# The short X.Y version
|
||||
# update for each release
|
||||
LATEST_VERSION = V2_DROPDOWN_VERSIONS[-1]
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = LATEST_VERSION
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
|
|
@ -209,14 +192,7 @@ html_theme_options = {
|
|||
}],
|
||||
'font': {'text': 'Open Sans'},
|
||||
'version_dropdown': True,
|
||||
'version_info': [
|
||||
{
|
||||
'version': f'https://google-cloud-pipeline-components.readthedocs.io/en/google-cloud-pipeline-components-{version}',
|
||||
'title': version,
|
||||
'aliases': [],
|
||||
}
|
||||
for version in reversed(V2_DROPDOWN_VERSIONS)
|
||||
],
|
||||
'version_json': 'https://raw.githubusercontent.com/kubeflow/pipelines/test-gcpc-dropdown/versions.json',
|
||||
# "toc_title_is_page_title": True,
|
||||
}
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
[
|
||||
{
|
||||
"version": "https://google-cloud-pipeline-components.readthedocs.io/en/google-cloud-pipeline-components-2.1.0",
|
||||
"title": "2.1.0",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"version": "https://google-cloud-pipeline-components.readthedocs.io/en/google-cloud-pipeline-components-2.0.0",
|
||||
"title": "2.0.0",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"version": "https://google-cloud-pipeline-components.readthedocs.io/en/google-cloud-pipeline-components-2.0.0b5",
|
||||
"title": "2.0.0b5",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"version": "https://google-cloud-pipeline-components.readthedocs.io/en/google-cloud-pipeline-components-2.0.0b4",
|
||||
"title": "2.0.0b4",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"version": "https://google-cloud-pipeline-components.readthedocs.io/en/google-cloud-pipeline-components-2.0.0b3",
|
||||
"title": "2.0.0b3",
|
||||
"aliases": []
|
||||
}
|
||||
]
|
||||
Loading…
Reference in New Issue