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
ffcc6cad
Commit
ffcc6cad
authored
Jul 13, 2015
by
Daniel Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
run munger over examples dir
parent
bf77ecc3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
9 deletions
+27
-9
util.sh
hack/lib/util.sh
+3
-7
run-gendocs.sh
hack/run-gendocs.sh
+12
-2
verify-gendocs.sh
hack/verify-gendocs.sh
+12
-0
No files found.
hack/lib/util.sh
View file @
ffcc6cad
...
...
@@ -144,13 +144,9 @@ kube::util::gen-doc() {
ls
"
${
tmpdir
}
"
|
LC_ALL
=
C
sort
>
"
${
tmpdir
}
/.files_generated"
while
read
file
;
do
# Add analytics link to generated .md files
if
[[
"
${
file
}
"
==
*
.md
]]
;
then
local link
path
path
=
"
${
relative_doc_dest
}
/
${
file
}
"
link
=
$(
kube::util::analytics-link
"
${
path
}
"
)
echo
-e
"
\n\n
${
link
}
"
>>
"
${
tmpdir
}
/
${
file
}
"
fi
# Don't add analytics link to generated .md files -- that is done (and
# checked) by mungedocs.
# Remove all old generated files from the destination
if
[[
-e
"
${
tmpdir
}
/
${
file
}
"
]]
;
then
local
original generated
...
...
hack/run-gendocs.sh
View file @
ffcc6cad
...
...
@@ -45,10 +45,20 @@ kube::util::gen-doc "${genman}" "${KUBE_ROOT}" "docs/man/man1"
kube::util::gen-doc
"
${
genbashcomp
}
"
"
${
KUBE_ROOT
}
"
"contrib/completions/bash/"
kube::util::gen-analytics
"
${
KUBE_ROOT
}
"
"
${
mungedocs
}
"
"--root-dir=
${
KUBE_ROOT
}
/docs/"
"
${
mungedocs
}
"
"--root-dir=
${
KUBE_ROOT
}
/docs/"
ret
=
$?
if
[[
$ret
-eq
1
]]
;
then
echo
"
${
KUBE_ROOT
}
/docs/ requires manual changes. See proceeding errors."
echo
"
${
KUBE_ROOT
}
/docs/ requires manual changes. See preceeding errors."
exit
1
elif
[[
$ret
-eq
2
]]
;
then
echo
"Error running mungedocs."
exit
1
fi
"
${
mungedocs
}
"
"--root-dir=
${
KUBE_ROOT
}
/examples/"
ret
=
$?
if
[[
$ret
-eq
1
]]
;
then
echo
"
${
KUBE_ROOT
}
/examples/ requires manual changes. See preceeding errors."
exit
1
elif
[[
$ret
-eq
2
]]
;
then
echo
"Error running mungedocs."
...
...
hack/verify-gendocs.sh
View file @
ffcc6cad
...
...
@@ -40,6 +40,7 @@ if [[ ! -x "$gendocs" || ! -x "$genman" || ! -x "$genbashcomp" || ! -x "$mungedo
fi
DOCROOT
=
"
${
KUBE_ROOT
}
/docs/"
EXAMPLEROOT
=
"
${
KUBE_ROOT
}
/examples/"
TMP_DOCROOT
=
"
${
KUBE_ROOT
}
/_tmp/docs/"
_tmp
=
"
${
KUBE_ROOT
}
/_tmp"
...
...
@@ -59,6 +60,17 @@ if [[ $ret -eq 2 ]]; then
exit
1
fi
"
${
mungedocs
}
"
"--verify=true"
"--root-dir=
${
EXAMPLEROOT
}
"
ret
=
$?
if
[[
$ret
-eq
1
]]
;
then
echo
"
${
EXAMPLEROOT
}
is out of date. Please run hack/run-gendocs.sh"
exit
1
fi
if
[[
$ret
-eq
2
]]
;
then
echo
"Error running mungedocs"
exit
1
fi
kube::util::gen-doc
"
${
genman
}
"
"
${
_tmp
}
"
"docs/man/man1/"
kube::util::gen-doc
"
${
gendocs
}
"
"
${
_tmp
}
"
"docs/user-guide/kubectl/"
'###### Auto generated by spf13/cobra'
...
...
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