Код: Выделить всё
#!/bin/bash
repo init -u https://android.googlesource.com/platform/manifest -b android-14.0.0_r9 --mirror
repo sync
repo_list=`repo list -p`
repo forall -c '
if [[ ${REPO_PATH} =~ $repo_list ]]; then
ssh -p 29418 gerritadmin@local-gerrit-host gerrit create-project aosp/${REPO_PATH} --parent All-Projects || echo "Failed to create project for ${REPO_PATH}"
fi
git push ssh://gerritadmin@local-gerrit-host:29418/aosp/${REPO_PATH} +refs/heads/* +refs/tags/* || echo "Failed to push ${REPO_PATH}"
'
В основном я стремлюсь свести к минимуму несколько соединений Gerrit SSH с нашим на локальный сервер gerrit, чтобы снизить нагрузку.
Не могли бы вы помочь мне найти правильный подход для достижения этой цели?
Подробнее здесь: https://stackoverflow.com/questions/781 ... cal-gerrit
Мобильная версия