Linking to API object definitions from docs

This commit is contained in:
nikhiljindal
2015-07-20 00:44:11 -07:00
parent 7dab0af1f4
commit 021138bd83
8 changed files with 40 additions and 1 deletions

View File

@@ -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}"