Only clone docs on initial releases.

This commit is contained in:
Brendan Burns 2015-06-15 20:23:09 -07:00
parent 0cb58606b7
commit 497d6019f2

View File

@ -91,19 +91,21 @@ fi
VERSION_FILE="${KUBE_ROOT}/pkg/version/base.go" VERSION_FILE="${KUBE_ROOT}/pkg/version/base.go"
RELEASE_DIR=release-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} if [[ "${VERSION_PATCH}" == "0" ]]; then
echo "+++ Cloning documentation and examples into ${RELEASE_DIR}/..." RELEASE_DIR=release-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}
mkdir ${RELEASE_DIR} echo "+++ Cloning documentation and examples into ${RELEASE_DIR}/..."
cp -r docs ${RELEASE_DIR}/docs mkdir ${RELEASE_DIR}
cp -r examples ${RELEASE_DIR}/examples cp -r docs ${RELEASE_DIR}/docs
cp -r examples ${RELEASE_DIR}/examples
# Update the docs to match this version. # Update the docs to match this version.
perl -pi -e "s/HEAD/${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}/" ${RELEASE_DIR}/docs/README.md perl -pi -e "s/HEAD/${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}/" ${RELEASE_DIR}/docs/README.md
perl -pi -e "s/HEAD/${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}/" ${RELEASE_DIR}/examples/README.md perl -pi -e "s/HEAD/${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}/" ${RELEASE_DIR}/examples/README.md
${KUBE_ROOT}/hack/run-gendocs.sh ${KUBE_ROOT}/hack/run-gendocs.sh
git add ${RELEASE_DIR} git add ${RELEASE_DIR}
git commit -m "Cloning docs for ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" git commit -m "Cloning docs for ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
fi
GIT_MINOR="${VERSION_MINOR}.${VERSION_PATCH}" GIT_MINOR="${VERSION_MINOR}.${VERSION_PATCH}"
echo "+++ Updating to ${NEW_VERSION}" echo "+++ Updating to ${NEW_VERSION}"