Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
b7916424
Commit
b7916424
authored
Oct 27, 2015
by
Daniel Smith
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16217 from caesarxuchao/update-versionize
versionize the include directory in definitions.md and operations.md
parents
3f3ca480
45b0917b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
4 deletions
+12
-4
versionize-docs.sh
build/versionize-docs.sh
+8
-0
definitions.md
docs/api-reference/extensions/v1beta1/definitions.md
+1
-1
operations.md
docs/api-reference/extensions/v1beta1/operations.md
+1
-1
definitions.md
docs/api-reference/v1/definitions.md
+1
-1
operations.md
docs/api-reference/v1/operations.md
+1
-1
No files found.
build/versionize-docs.sh
View file @
b7916424
...
...
@@ -27,6 +27,9 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
NEW_VERSION
=
${
1
-
}
# NEW_VERSION is expected to be vMajor.Minor.Micro.
MAJOR_AND_MINOR_VERSION
=
${
NEW_VERSION
%.*
}
if
[
"$#"
-lt
1
]
;
then
echo
"Usage: versionize-docs <release-version>"
exit
1
...
...
@@ -45,6 +48,8 @@ echo "+++ Versioning documentation and examples"
# Update the docs to match this version.
HTML_PREVIEW_PREFIX
=
"https://htmlpreview.github.io/
\?
https://github.com/kubernetes/kubernetes"
# Update the include directory in definitions.md and operations.md.
DIRECTORY_KEY_WORDS
=
"<REPLACE-WITH-RELEASE-VERSION>"
md_dirs
=(
docs examples
)
md_files
=()
...
...
@@ -60,6 +65,9 @@ for doc in "${md_files[@]}"; do
# Replace /HEAD in html preview links with /NEW_VERSION.
$SED
-ri
-e
"s|(
${
HTML_PREVIEW_PREFIX
}
)/HEAD|
\1
/blob/
${
NEW_VERSION
}
|g"
"
${
doc
}
"
# Replace <REPLACE-WITH-RELEASE-VERSION> with MAJOR_AND_MINOR_VERSION.
$SED
-ri
-e
"s|
${
DIRECTORY_KEY_WORDS
}
|
${
MAJOR_AND_MINOR_VERSION
}
|g"
"
${
doc
}
"
is_versioned_tag
=
"<!-- BEGIN MUNGE: IS_VERSIONED -->
<!-- TAG IS_VERSIONED -->
<!-- END MUNGE: IS_VERSIONED -->"
...
...
docs/api-reference/extensions/v1beta1/definitions.md
View file @
b7916424
...
...
@@ -31,7 +31,7 @@ Documentation for other releases can be found at
<!-- END MUNGE: UNVERSIONED_WARNING -->
<!-- needed for gh-pages to render html files when imported -->
{% include extensions-v1beta1-definitions.html %}
{% include
<REPLACE-WITH-RELEASE-VERSION>
/
extensions-v1beta1-definitions.html %}
...
...
docs/api-reference/extensions/v1beta1/operations.md
View file @
b7916424
...
...
@@ -31,7 +31,7 @@ Documentation for other releases can be found at
<!-- END MUNGE: UNVERSIONED_WARNING -->
<!-- needed for gh-pages to render html files when imported -->
{% include extensions-v1beta1-operations.html %}
{% include
<REPLACE-WITH-RELEASE-VERSION>
/
extensions-v1beta1-operations.html %}
...
...
docs/api-reference/v1/definitions.md
View file @
b7916424
...
...
@@ -31,7 +31,7 @@ Documentation for other releases can be found at
<!-- END MUNGE: UNVERSIONED_WARNING -->
<!-- needed for gh-pages to render html files when imported -->
{% include v1-definitions.html %}
{% include
<REPLACE-WITH-RELEASE-VERSION>
/
v1-definitions.html %}
...
...
docs/api-reference/v1/operations.md
View file @
b7916424
...
...
@@ -31,7 +31,7 @@ Documentation for other releases can be found at
<!-- END MUNGE: UNVERSIONED_WARNING -->
<!-- needed for gh-pages to render html files when imported -->
{% include v1-operations.html %}
{% include
<REPLACE-WITH-RELEASE-VERSION>
/
v1-operations.html %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment