Linking to API object definitions from docs
This commit is contained in:
@@ -92,6 +92,7 @@ fi
|
||||
echo "+++ Versioning documentation and examples"
|
||||
|
||||
# Update the docs to match this version.
|
||||
HTML_PREVIEW_PREFIX="https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes"
|
||||
md_dirs=(docs examples)
|
||||
md_files=()
|
||||
for dir in "${md_dirs[@]}"; do
|
||||
@@ -102,6 +103,10 @@ for doc in "${mdfiles[@]}"; do
|
||||
-e '/<!-- BEGIN STRIP_FOR_RELEASE -->/,/<!-- END STRIP_FOR_RELEASE -->/d' \
|
||||
-e "s|(releases.k8s.io)/[^/]+|\1/${NEW_VERSION}|" \
|
||||
"${doc}"
|
||||
|
||||
# Replace /HEAD in html preview links with /NEW_VERSION.
|
||||
$SED -ri -e "s|(${HTML_PREVIEW_PREFIX}/HEAD)|${HTML_PREVIEW_PREFIX}/${NEW_VERSION}|"
|
||||
|
||||
is_versioned_tag='<!-- TAG IS_VERSIONED -->'
|
||||
if ! grep -q "${is_versioned_tag}" "${doc}"; then
|
||||
echo "${is_versioned_tag}" >> "${doc}"
|
||||
|
Reference in New Issue
Block a user