fix: set upstream
This commit is contained in:
parent
363d4cbf20
commit
4ee6612388
12
sync.sh
12
sync.sh
@ -58,10 +58,10 @@ for REPO in ${REPOS}; do
|
|||||||
git remote add gitlab "${GITLAB_BASE}$(echo ${REPO} |tr "." "-")" 1> /dev/null
|
git remote add gitlab "${GITLAB_BASE}$(echo ${REPO} |tr "." "-")" 1> /dev/null
|
||||||
|
|
||||||
failed() {
|
failed() {
|
||||||
printf "\n⚠️ Failed to sync ${REPO}\n\n"
|
printf "\n⚠️ Failed to sync ${REPO} to ${1}\n\n"
|
||||||
cd ..
|
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}
|
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 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 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 --set-upstream github ${BRANCH} 1> /dev/null || { failed "github"; }
|
||||||
git push -f bitbucket ${BRANCH} 1> /dev/null || { failed; }
|
git push -f --set-upstream bitbucket ${BRANCH} 1> /dev/null || { failed "bitbucket"; }
|
||||||
git push -f gitlab ${BRANCH} 1> /dev/null || { failed; }
|
git push -f --set-upstream gitlab ${BRANCH} 1> /dev/null || { failed "gitlab"; }
|
||||||
git push gitea ${BRANCH} 1> /dev/null || { failed; }
|
git push --set-upstream gitea ${BRANCH} 1> /dev/null || { failed "gitea"; }
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf ${REPO}
|
rm -rf ${REPO}
|
||||||
|
Loading…
Reference in New Issue
Block a user