fix: set upstream

This commit is contained in:
Marcus Noble 2021-07-24 11:53:47 +01:00
parent 363d4cbf20
commit 4ee6612388
1 changed files with 6 additions and 6 deletions

12
sync.sh
View File

@ -58,10 +58,10 @@ for REPO in ${REPOS}; do
git remote add gitlab "${GITLAB_BASE}$(echo ${REPO} |tr "." "-")" 1> /dev/null
failed() {
printf "\n⚠ Failed to sync ${REPO}\n\n"
printf "\n⚠ Failed to sync ${REPO} to ${1}\n\n"
cd ..
FAILED_MESSAGE="${FAILED_MESSAGE}\n⚠ Failed to sync ${REPO}\n\n"
FAILED_MESSAGE="${FAILED_MESSAGE}\n⚠ Failed to sync ${REPO} to ${1}\n\n"
}
githubGetRepo ${REPO} || githubMakeRepo ${REPO}
@ -73,10 +73,10 @@ for REPO in ${REPOS}; do
git pull --ff-only bitbucket ${BRANCH} 1> /dev/null || printf "\n Unable to pull from BitBucket\n\n"
git pull --ff-only gitlab ${BRANCH} 1> /dev/null || printf "\n Unable to pull from Gitlab\n\n"
git push -f github ${BRANCH} 1> /dev/null || { failed; }
git push -f bitbucket ${BRANCH} 1> /dev/null || { failed; }
git push -f gitlab ${BRANCH} 1> /dev/null || { failed; }
git push gitea ${BRANCH} 1> /dev/null || { failed; }
git push -f --set-upstream github ${BRANCH} 1> /dev/null || { failed "github"; }
git push -f --set-upstream bitbucket ${BRANCH} 1> /dev/null || { failed "bitbucket"; }
git push -f --set-upstream gitlab ${BRANCH} 1> /dev/null || { failed "gitlab"; }
git push --set-upstream gitea ${BRANCH} 1> /dev/null || { failed "gitea"; }
cd ..
rm -rf ${REPO}