summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorZhizhen He <hezhizhen.yi@gmail.com>2023-03-23 22:04:34 +0800
committerZhizhen He <hezhizhen.yi@gmail.com>2023-08-25 20:42:43 +0800
commit10e5aeb1ba420da20c9d467e300205eed07055b9 (patch)
tree46b0d1373c85184a55f5e695ac55c020f92b3973 /hack
parentMerge pull request #4939 from wlq1212/e2e/compatibility (diff)
downloadkubeedge-10e5aeb1ba420da20c9d467e300205eed07055b9.tar.gz
fix typo and update comments
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
Diffstat (limited to 'hack')
-rwxr-xr-xhack/generate-crds.sh2
-rwxr-xr-xhack/lib/install.sh18
-rwxr-xr-xhack/sync-subproject-code.sh12
-rwxr-xr-xhack/update-vendor-licenses.sh2
4 files changed, 15 insertions, 19 deletions
diff --git a/hack/generate-crds.sh b/hack/generate-crds.sh
index 0fcb0f4ca..dcb45fb78 100755
--- a/hack/generate-crds.sh
+++ b/hack/generate-crds.sh
@@ -59,7 +59,7 @@ while [ $# -gt 0 ]; do
done
function :pre:install: {
- # install controller-gen tool if not exsit
+ # install controller-gen tool if not exist
if [ "$(which controller-gen)" == "" ]; then
echo "Start to install controller-gen tool"
GO111MODULE=on go install -v sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2
diff --git a/hack/lib/install.sh b/hack/lib/install.sh
index 6d777ebd9..2940f65e2 100755
--- a/hack/lib/install.sh
+++ b/hack/lib/install.sh
@@ -38,7 +38,7 @@ function check_kind {
exit 1
fi
- # avoid modifing go.sum and go.mod when installing the kind
+ # avoid modifying go.sum and go.mod when installing the kind
git checkout -- go.mod go.sum
export PATH=$PATH:$GOPATH/bin
@@ -69,16 +69,16 @@ function check_golangci-lint {
function install_golangci-lint {
echo "installing golangci-lint ."
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOPATH}/bin v1.51.1
- if [[ $? -ne 0 ]]; then
- echo "golangci-lint installed failed, exiting."
- exit 1
- fi
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOPATH}/bin v1.51.1
+ if [[ $? -ne 0 ]]; then
+ echo "golangci-lint installed failed, exiting."
+ exit 1
+ fi
- export PATH=$PATH:$GOPATH/bin
+ export PATH=$PATH:$GOPATH/bin
}
-verify_containerd_installed(){
+verify_containerd_installed() {
# verify the containerd installed
command -v containerd >/dev/null || {
echo "must install the containerd first"
@@ -86,7 +86,7 @@ verify_containerd_installed(){
}
}
-verify_docker_installed(){
+verify_docker_installed() {
# verify the docker installed
command -v docker >/dev/null || {
echo "must install the docker first"
diff --git a/hack/sync-subproject-code.sh b/hack/sync-subproject-code.sh
index 33b439b8d..61e7daa7b 100755
--- a/hack/sync-subproject-code.sh
+++ b/hack/sync-subproject-code.sh
@@ -25,7 +25,7 @@ CHECK_GIT_REMOTE=${CHECK_GIT_REMOTE:-true}
# Useful Defaults
## Target github organization name
TARGET_ORG=${TARGET_ORG:-"kubeedge"}
-## main repo uptream configs
+## main repo upstream configs
UPSTREAM=${UPSTREAM:-"upstream"}
UPSTREAM_HEAD=${UPSTREAM_HEAD:-"master"}
UPSTREAM_REPO_NAME=${UPSTREAM_REPO_NAME:-"kubeedge"}
@@ -38,7 +38,6 @@ PATH_TO_SYNC=${PATH_TO_SYNC:-"staging/src/github.com/kubeedge/beehive"}
# branch name for working changes
WORKING_BRANCH_NAME=${WORKING_BRANCH_NAME:-"sync-beehive-code"}
-
PROTO_HEAD="git@"
SPLITER=":"
if [[ ${USE_HTTPS} ]]; then
@@ -70,8 +69,7 @@ git remote update --prune ${UPSTREAM} ${OOT_UPSTREAM}
printf "[INFO] creating branch %s based on %s.\n" ${WORKING_BRANCH_NAME} "${UPSTREAM}/${UPSTREAM_HEAD}"
git checkout -b ${WORKING_BRANCH_NAME} --track "${UPSTREAM}/${UPSTREAM_HEAD}"
-
-function sync-code(){
+function sync-code() {
local PTS=$1
local target_head=$(git log -1 --pretty=format:"%H" ${OOT_UPSTREAM}/${OOT_UPSTREAM_HEAD})
@@ -93,7 +91,6 @@ function sync-code(){
# Check in code with history from upstream repo
sync-code "${PATH_TO_SYNC}"
-
NEW_COMMIT=$(git write-tree)
PARENT_A=$(git rev-parse ${WORKING_BRANCH_NAME})
PARENT_B=$(git rev-parse ${OOT_UPSTREAM}/${OOT_UPSTREAM_HEAD})
@@ -102,10 +99,9 @@ printf "[INFO] generating merge commit %s with parents:\n" ${NEW_COMMIT}
printf "\t%-20s\t%s\n" ${UPSTREAM} ${PARENT_A}
printf "\t%-20s\t%s\n" ${OOT_UPSTREAM} ${PARENT_B}
-
# commit subtree updates
-FINAL_COMMIT=$(echo "update in-tree ${OOT_UPSTREAM} code" |\
- git commit-tree ${NEW_COMMIT} -p ${PARENT_A} -p ${PARENT_B})
+FINAL_COMMIT=$(echo "update in-tree ${OOT_UPSTREAM} code" |
+ git commit-tree ${NEW_COMMIT} -p ${PARENT_A} -p ${PARENT_B})
git reset ${FINAL_COMMIT}
diff --git a/hack/update-vendor-licenses.sh b/hack/update-vendor-licenses.sh
index 74b1b9d18..debc396c1 100755
--- a/hack/update-vendor-licenses.sh
+++ b/hack/update-vendor-licenses.sh
@@ -164,7 +164,7 @@ cd "${LICENSE_ROOT}"
kube::util::ensure-temp-dir
-# Save the genreated LICENSE file for each package temporarily
+# Save the generated LICENSE file for each package temporarily
TMP_LICENSE_FILE="${KUBE_TEMP}/LICENSES.$$"
# The directory to save all the LICENSE files