diff options
| author | Zhizhen He <hezhizhen.yi@gmail.com> | 2023-03-23 22:04:34 +0800 |
|---|---|---|
| committer | Zhizhen He <hezhizhen.yi@gmail.com> | 2023-08-25 20:42:43 +0800 |
| commit | 10e5aeb1ba420da20c9d467e300205eed07055b9 (patch) | |
| tree | 46b0d1373c85184a55f5e695ac55c020f92b3973 /hack/sync-subproject-code.sh | |
| parent | Merge pull request #4939 from wlq1212/e2e/compatibility (diff) | |
| download | kubeedge-10e5aeb1ba420da20c9d467e300205eed07055b9.tar.gz | |
fix typo and update comments
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
Diffstat (limited to 'hack/sync-subproject-code.sh')
| -rwxr-xr-x | hack/sync-subproject-code.sh | 12 |
1 files changed, 4 insertions, 8 deletions
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} |
