Refdocs for 1.2 import

This commit is contained in:
John Mulhausen
2016-03-07 16:51:25 +00:00
parent 0a20f23ad9
commit a777a06bb1
69 changed files with 34475 additions and 19307 deletions
+29 -21
View File
@@ -1,42 +1,50 @@
git clone https://github.com/kubernetes/kubernetes.git k8s
cd k8s
git checkout gh-pages
git checkout release-1.2
cd ..
rm -rf _includes/v1.2
mkdir _includes/v1.2
unalias cp
# batch fetches
while read line || [[ -n ${line} ]]; do
IFS=': ' read -a myarray <<< "${line}"
# echo "arraypos0: ${myarray[0]}"
# echo "arraypos1: ${myarray[1]}"
# echo "arraypos2: ${myarray[2]}"
#echo "arraypos0: ${myarray[0]}"
#echo "arraypos1: ${myarray[1]}"
#echo "arraypos2: ${myarray[2]}"
#echo "arraypos3: ${myarray[3]}"
if [ "${myarray[1]}" = "path" ]; then
TARGET="${myarray[2]}"
CLEARPATH="${TARGET}"
K8SSOURCE='k8s/_'${TARGET}
K8SSOURCE='k8s/'${TARGET}
DESTINATION=${TARGET%/*}
rm -rf "${CLEARPATH}"
mv -f "${K8SSOURCE}" "${DESTINATION}"
find "${DESTINATION}" -name "*.md" -print0 | xargs -0 sed -i '' -e 's/.html)/)/g'
# find "${DESTINATION}" -name "*${DESTINATION}" -print0 | xargs -0 sed -i '' -e 's/.html)/)/g'
fi
if [ "${myarray[1]}" = "changedpath" ]; then
SRC="${myarray[2]}"
DESTINATION="${myarray[3]}"
echo "mv -f ${SRC} ${DESTINATION}"
mv -f "${SRC}" "${DESTINATION}"
fi
if [ "${myarray[1]}" = "copypath" ]; then
K8SSOURCE="${myarray[2]}"
DESTINATION="${myarray[3]}"
echo "yes | cp -rf ${K8SSOURCE} ${DESTINATION}"
yes | cp -rf "${K8SSOURCE}" "${DESTINATION}"
fi
done <_data/overrides.yml
rm -rf _includes/v1.1
mv -f k8s/_includes/v1.1 _includes/
cd _includes/v1.1
# refdoc munging
cd _includes/v1.2
find . -name '*.html' -type f -exec sed -i '' '/<style>/,/<\/style>/d' {} \;
find . -name '*.html' -print0 | xargs -0 sed -i '' -e 's/http:\/\/kubernetes.io\/v1.1//g'
find . -name '*.html' -print0 | xargs -0 sed -i '' -e 's/http:\/\/kubernetes.io\/v1.2//g'
cd ..
cd ..
rm -rf k8s
# Single-file fetches
rm -rf docs/getting-started-guides/fluentd-gcp.yaml
rm -rf docs/getting-started-guides/counter-pod.yaml
rm -rf docs/user-guide/counter-pod.yaml
curl https://raw.githubusercontent.com/kubernetes/kubernetes/release-1.1/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml > docs/getting-started-guides/fluentd-gcp.yaml
curl https://raw.githubusercontent.com/kubernetes/kubernetes/release-1.1/examples/blog-logging/counter-pod.yaml > docs/getting-started-guides/counter-pod.yaml
curl https://raw.githubusercontent.com/kubernetes/kubernetes/release-1.1/examples/blog-logging/counter-pod.yaml > docs/user-guide/counter-pod.yaml
git add .
git commit -m "Ran update-imported-docs.sh"
echo "Docs imported! Run 'git push' to upload them"
echo "Docs imported! Run 'git add .' 'git commit -m <comment>' and 'git push' to upload them"