mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
Merge pull request #27808 from david-mcmahon/kube-upstream
Automatic merge from submit-queue 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)
This commit is contained in:
@@ -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=$?
|
||||
|
||||
Reference in New Issue
Block a user