Merge branch 'main' of github.com:swiftslee/k8s-website

pull/28954/head
yuswift 2022-02-21 20:17:45 +08:00
commit 62f4b02e65
1 changed files with 2 additions and 2 deletions

View File

@ -67,10 +67,10 @@ ERROR_LOG="${TMP_DIR}/errors.log"
# this file. # this file.
skipping_file="${KUBE_ROOT}/scripts/.spelling_failures" skipping_file="${KUBE_ROOT}/scripts/.spelling_failures"
failing_packages=$(sed "s| | -e |g" "${skipping_file}") failing_packages=$(sed "s| | -e |g" "${skipping_file}")
git ls-files | grep content/${LANGUAGE} | grep -v -e "${failing_packages}" | xargs misspell > "${ERROR_LOG}" git ls-files -z | grep --null-data "^content/${LANGUAGE}" | grep --null-data -v -e "${failing_packages}" | xargs -0 -r misspell > "${ERROR_LOG}"
if [[ -s "${ERROR_LOG}" ]]; then if [[ -s "${ERROR_LOG}" ]]; then
sed 's/^/error: /' "${ERROR_LOG}" # add 'error' to each line to highlight in e2e status sed 's/^/error: /' "${ERROR_LOG}" # add 'error' to each line to highlight in e2e status
echo "Found spelling errors!" echo "Found spelling errors!" >&2
RES=1 RES=1
fi fi
exit "${RES}" exit "${RES}"