From 751a61429667ec54c4765c3f7de43b1516c453df Mon Sep 17 00:00:00 2001 From: lisimin Date: Thu, 17 Mar 2022 21:42:25 +0800 Subject: [PATCH] add branch to manifest, fix xml format error add branch info to manifest, and fix xml format error,missing / and the end Signed-off-by: lisimin --- scripts/download_code.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/download_code.sh b/scripts/download_code.sh index 6bc1dfdb132..d7416c8d76a 100644 --- a/scripts/download_code.sh +++ b/scripts/download_code.sh @@ -13,9 +13,10 @@ EOF while read line do local revision="$(echo $line| awk '{print $2}')" + local branchname="$(echo $line| awk '{print $3}')" local repo="$(echo $line| awk '{print $1}')" local localpath="$(basename ${repo} | sed "s|\.git$||")" - echo " " >> "${SRC_DIR}"/manifest.xml + echo " " >> "${SRC_DIR}"/manifest.xml done < "${SRC_DIR}"/code.list.sort echo "" >> "${SRC_DIR}"/manifest.xml rm -f "${SRC_DIR}"/code.list.sort @@ -45,7 +46,7 @@ update_code_repo() git status | grep "is up to date with" || exit 1 local newest_commitid="$(git log --pretty=oneline -n1 | awk '{print $1}')" #update the code list - echo "${repo} ${newest_commitid}" >> "${SRC_DIR}"/code.list + echo "${repo} ${newest_commitid} ${branchname}" >> "${SRC_DIR}"/code.list popd popd } @@ -156,6 +157,7 @@ usage() SRC_DIR="$1" # the git branch to sync +# you can set branch/tag/commitid SRC_BRANCH="$2" # the fixed git branch SRC_BRANCH_FIXED="openEuler-21.09" -- Gitee