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
610234dc
Commit
610234dc
authored
Jun 21, 2016
by
David McMahon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move KUBE_GIT_UPSTREAM out of init.sh and into *-munge-docs.sh.
It is only used in those 2 scripts and this way we can set the value dynamically. Clean up a bit too (80col, formatting)
parent
8b817c4a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
init.sh
hack/lib/init.sh
+0
-2
update-munge-docs.sh
hack/update-munge-docs.sh
+11
-3
verify-munge-docs.sh
hack/verify-munge-docs.sh
+5
-2
No files found.
hack/lib/init.sh
View file @
610234dc
...
...
@@ -39,8 +39,6 @@ source "${KUBE_ROOT}/hack/lib/version.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/golang.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/etcd.sh"
KUBE_GIT_UPSTREAM
=
"
${
KUBE_GIT_UPSTREAM
:-
upstream
}
"
KUBE_OUTPUT_HOSTBIN
=
"
${
KUBE_OUTPUT_BINPATH
}
/
$(
kube::util::host_platform
)
"
# This emulates "readlink -f" which is not available on MacOS X.
...
...
hack/update-munge-docs.sh
View file @
610234dc
...
...
@@ -21,6 +21,9 @@ set -o pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
git_upstream
=
$(
kube::util::git_upstream_remote_name
)
:
${
git_upstream
:
=
"upstream"
}
kube::golang::setup_env
"
${
KUBE_ROOT
}
/hack/build-go.sh"
\
...
...
@@ -31,7 +34,10 @@ kube::util::ensure-temp-dir
kube::util::gen-analytics
"
${
KUBE_ROOT
}
"
mungedocs
=
$(
kube::util::find-binary
"mungedocs"
)
"
${
mungedocs
}
"
"--upstream=
${
KUBE_GIT_UPSTREAM
}
"
"--root-dir=
${
KUBE_ROOT
}
/docs/"
&&
ret
=
0
||
ret
=
$?
"
${
mungedocs
}
"
"--upstream=
${
git_upstream
}
"
"--root-dir=
${
KUBE_ROOT
}
/docs/"
\
&&
ret
=
0
||
ret
=
$?
if
[[
$ret
-eq
1
]]
;
then
echo
"
${
KUBE_ROOT
}
/docs/ requires manual changes. See preceding errors."
exit
1
...
...
@@ -40,7 +46,9 @@ elif [[ $ret -gt 1 ]]; then
exit
1
fi
"
${
mungedocs
}
"
"--upstream=
${
KUBE_GIT_UPSTREAM
}
"
"--root-dir=
${
KUBE_ROOT
}
/examples/"
&&
ret
=
0
||
ret
=
$?
"
${
mungedocs
}
"
"--upstream=
${
git_upstream
}
"
\
"--root-dir=
${
KUBE_ROOT
}
/examples/"
&&
ret
=
0
||
ret
=
$?
if
[[
$ret
-eq
1
]]
;
then
echo
"
${
KUBE_ROOT
}
/examples/ requires manual changes. See preceding errors."
exit
1
...
...
@@ -49,7 +57,7 @@ elif [[ $ret -gt 1 ]]; then
exit
1
fi
"
${
mungedocs
}
"
"--upstream=
${
KUBE_GIT_UPSTREAM
}
"
\
"
${
mungedocs
}
"
"--upstream=
${
git_upstream
}
"
\
"--skip-munges=unversioned-warning,analytics"
\
"--norecurse"
\
"--root-dir=
${
KUBE_ROOT
}
/"
&&
ret
=
0
||
ret
=
$?
...
...
hack/verify-munge-docs.sh
View file @
610234dc
...
...
@@ -21,6 +21,9 @@ set -o pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
git_upstream
=
$(
kube::util::git_upstream_remote_name
)
:
${
git_upstream
:
=
"upstream"
}
kube::golang::setup_env
"
${
KUBE_ROOT
}
/hack/build-go.sh"
\
...
...
@@ -35,7 +38,7 @@ EXAMPLEROOT="${KUBE_ROOT}/examples/"
# mungedocs --verify can (and should) be run on the real docs, otherwise their
# links will be distorted. --verify means that it will not make changes.
# --verbose gives us output we can use for a diff.
"
${
mungedocs
}
"
"--verify=true"
"--verbose=true"
"--upstream=
${
KUBE_GIT_UPSTREAM
}
"
"--root-dir=
${
DOCROOT
}
"
&&
ret
=
0
||
ret
=
$?
"
${
mungedocs
}
"
"--verify=true"
"--verbose=true"
"--upstream=
${
git_upstream
}
"
"--root-dir=
${
DOCROOT
}
"
&&
ret
=
0
||
ret
=
$?
if
[[
$ret
-eq
1
]]
;
then
echo
"
${
DOCROOT
}
is out of date. Please run hack/update-munge-docs.sh"
exit
1
...
...
@@ -45,7 +48,7 @@ if [[ $ret -gt 1 ]]; then
exit
1
fi
"
${
mungedocs
}
"
"--verify=true"
"--verbose=true"
"--upstream=
${
KUBE_GIT_UPSTREAM
}
"
"--root-dir=
${
EXAMPLEROOT
}
"
&&
ret
=
0
||
ret
=
$?
"
${
mungedocs
}
"
"--verify=true"
"--verbose=true"
"--upstream=
${
git_upstream
}
"
"--root-dir=
${
EXAMPLEROOT
}
"
&&
ret
=
0
||
ret
=
$?
if
[[
$ret
-eq
1
]]
;
then
echo
"
${
EXAMPLEROOT
}
is out of date. Please run hack/update-munge-docs.sh"
exit
1
...
...
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