diff --git a/scripts/sources-branch-updater.sh b/scripts/sources-branch-updater.sh index 02d0587599..7a0b2d6a0c 100755 --- a/scripts/sources-branch-updater.sh +++ b/scripts/sources-branch-updater.sh @@ -27,7 +27,7 @@ IFS=$'\n' if echo "$@" | grep -e '-h' -e '--help';then echo " Options: - -b|--branch (name of branch) + -b|--branch (name of branch, eg: stable/liberty) -s|--service-file (path to service file to parse) " exit 0 @@ -85,7 +85,10 @@ for repo in $(grep 'git_repo\:' ${SERVICE_FILE}); do rm -rf ${repo_tmp_path} # Do a shallow clone of the repo to work with - git clone --quiet --depth=1 --origin ${branch_sha} ${repo_address} ${repo_tmp_path} + git clone --quiet --depth=10 --branch ${ONLINE_BRANCH} --no-checkout --single-branch ${repo_address} ${repo_tmp_path} + pushd ${repo_tmp_path} > /dev/null + git checkout --quiet ${branch_sha} + popd > /dev/null # Update the policy files find ${repo_tmp_path}/etc -name "policy.json" -exec \