From 7318b18c032074762c1783552cd4f8fc78dbf710 Mon Sep 17 00:00:00 2001 From: yuswift Date: Thu, 15 Jul 2021 19:43:40 +0800 Subject: [PATCH 1/6] fix some typos Signed-off-by: yuswift --- .../en/docs/tasks/manage-kubernetes-objects/kustomization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/tasks/manage-kubernetes-objects/kustomization.md b/content/en/docs/tasks/manage-kubernetes-objects/kustomization.md index 9b16c25167..4fb21f6138 100644 --- a/content/en/docs/tasks/manage-kubernetes-objects/kustomization.md +++ b/content/en/docs/tasks/manage-kubernetes-objects/kustomization.md @@ -299,7 +299,7 @@ metadata: type: Opaque ``` -Like ConfigMaps, generated Secrets can be used in Deployments by refering to the name of the secretGenerator: +Like ConfigMaps, generated Secrets can be used in Deployments by referring to the name of the secretGenerator: ```shell # Create a password.txt file From 919995fe3bd787efede0f02b18ef5d7ebb907176 Mon Sep 17 00:00:00 2001 From: yuswift Date: Thu, 15 Jul 2021 20:07:04 +0800 Subject: [PATCH 2/6] support ignoring files when check the spelling Signed-off-by: yuswift --- scripts/.spelling_failures | 10 ++++++++++ scripts/verify-spelling.sh | 13 +++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 scripts/.spelling_failures diff --git a/scripts/.spelling_failures b/scripts/.spelling_failures new file mode 100644 index 0000000000..8b0d9e0815 --- /dev/null +++ b/scripts/.spelling_failures @@ -0,0 +1,10 @@ +content/en/blog/_posts/2016-05-00-Coreosfest2016-Kubernetes-Community.md +content/en/blog/_posts/2016-10-00-Dynamic-Provisioning-And-Storage-In-Kubernetes.md +content/en/blog/_posts/2017-02-00-Postgresql-Clusters-Kubernetes-Statefulsets.md +content/en/blog/_posts/2018-06-28-Airflow-Kubernetes-Operator.md +content/en/blog/_posts/2018-10-02-network-bootable-farm-with-ltsp.md +content/en/blog/_posts/2019-03-19-kubeedge-k8s-based-edge-intro.md +content/en/blog/_posts/2020-05-06-third-party-dual-sourced-content.md +content/en/blog/_posts/2020-05-21-wsl2-dockerdesktop-k8s.md +content/en/blog/_posts/2020-07-27-kubernetes-1-17-release-interview.md + diff --git a/scripts/verify-spelling.sh b/scripts/verify-spelling.sh index c259d65ddb..99029c76d2 100755 --- a/scripts/verify-spelling.sh +++ b/scripts/verify-spelling.sh @@ -15,14 +15,14 @@ # limitations under the License. ########## # This script verifies mispellings in location. Today it only supports -# verifying English locale but can be modified in a future to support +# verifying English locale but can be modified in a future to support # also other locales. # You need to run this script inside the root directory of "website" git repo. -# +# # Syntax: verify-spelling.sh LOCALE # Example: verify-spelling.sh en # If no locale is passed, it will assume "en" -# +# # Requirements: # - go v1.14 or superior version @@ -34,6 +34,9 @@ set -o pipefail TOOL_VERSION="v0.3.4" +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. +export KUBE_ROOT + LANGUAGE="${1:-en}" # cd to the root path ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" @@ -60,7 +63,9 @@ cd "${ROOT}" RES=0 echo "Checking spelling..." ERROR_LOG="${TMP_DIR}/errors.log" -git ls-files | grep content/${LANGUAGE} | xargs misspell > "${ERROR_LOG}" +skipping_file="${KUBE_ROOT}/scripts/.spelling_failures" +failing_packages=$(sed "s| | -e |g" "${skipping_file}") +git ls-files | grep content/${LANGUAGE} | grep -v -e "${failing_packages}" | xargs misspell > "${ERROR_LOG}" if [[ -s "${ERROR_LOG}" ]]; then sed 's/^/error: /' "${ERROR_LOG}" # add 'error' to each line to highlight in e2e status echo "Found spelling errors!" From a78abf5b86c2c0c208e1bd16f736e7131cee369b Mon Sep 17 00:00:00 2001 From: yuswift Date: Sun, 18 Jul 2021 20:19:02 +0800 Subject: [PATCH 3/6] Add the reason why we ignore old blog typos Signed-off-by: yuswift --- scripts/verify-spelling.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/verify-spelling.sh b/scripts/verify-spelling.sh index 99029c76d2..2d1ad2a9e2 100755 --- a/scripts/verify-spelling.sh +++ b/scripts/verify-spelling.sh @@ -63,6 +63,9 @@ cd "${ROOT}" RES=0 echo "Checking spelling..." ERROR_LOG="${TMP_DIR}/errors.log" + +# NOTE we usually don't correct old blog articles, so we ignore them in +# this file. skipping_file="${KUBE_ROOT}/scripts/.spelling_failures" failing_packages=$(sed "s| | -e |g" "${skipping_file}") git ls-files | grep content/${LANGUAGE} | grep -v -e "${failing_packages}" | xargs misspell > "${ERROR_LOG}" From 42780f388dd1f975b7f89e23a7899df59cd6a26c Mon Sep 17 00:00:00 2001 From: Swift Date: Fri, 24 Dec 2021 15:28:21 +0800 Subject: [PATCH 4/6] Update scripts/verify-spelling.sh Co-authored-by: Tim Bannister --- scripts/verify-spelling.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/verify-spelling.sh b/scripts/verify-spelling.sh index 2d1ad2a9e2..910bebfb5b 100755 --- a/scripts/verify-spelling.sh +++ b/scripts/verify-spelling.sh @@ -68,7 +68,7 @@ ERROR_LOG="${TMP_DIR}/errors.log" # this file. skipping_file="${KUBE_ROOT}/scripts/.spelling_failures" 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 sed 's/^/error: /' "${ERROR_LOG}" # add 'error' to each line to highlight in e2e status echo "Found spelling errors!" From 1522ac81ff92089f93504d0b81b1fdfd9f66c300 Mon Sep 17 00:00:00 2001 From: Swift Date: Fri, 24 Dec 2021 15:28:36 +0800 Subject: [PATCH 5/6] Update scripts/verify-spelling.sh Co-authored-by: Tim Bannister --- scripts/verify-spelling.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/verify-spelling.sh b/scripts/verify-spelling.sh index 910bebfb5b..82595d62b0 100755 --- a/scripts/verify-spelling.sh +++ b/scripts/verify-spelling.sh @@ -71,7 +71,7 @@ failing_packages=$(sed "s| | -e |g" "${skipping_file}") 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 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 fi exit "${RES}" From cd3ee79a88cd4fe10d35bbe39c48b31357f08dc9 Mon Sep 17 00:00:00 2001 From: yuswift Date: Mon, 21 Feb 2022 20:14:35 +0800 Subject: [PATCH 6/6] update scripts/verify-spelling.sh --- scripts/verify-spelling.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/verify-spelling.sh b/scripts/verify-spelling.sh index 2d1ad2a9e2..4ea66cad8f 100755 --- a/scripts/verify-spelling.sh +++ b/scripts/verify-spelling.sh @@ -16,7 +16,7 @@ ########## # This script verifies mispellings in location. Today it only supports # verifying English locale but can be modified in a future to support -# also other locales. +# other locales also # You need to run this script inside the root directory of "website" git repo. # # Syntax: verify-spelling.sh LOCALE @@ -35,7 +35,6 @@ set -o pipefail TOOL_VERSION="v0.3.4" KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -export KUBE_ROOT LANGUAGE="${1:-en}" # cd to the root path