Compare commits
No commits in common. "8649480230b6f031328b93e1610395c77ca1b5de" and "f813ae279f92037fad46bd647df2e302e50acdf9" have entirely different histories.
8649480230
...
f813ae279f
13
sync.sh
13
sync.sh
@ -31,7 +31,7 @@ bitbucketGetRepo() {
|
|||||||
}
|
}
|
||||||
bitbucketMakeRepo() {
|
bitbucketMakeRepo() {
|
||||||
echo "Creating bitbucket repo"
|
echo "Creating bitbucket repo"
|
||||||
curl -X POST -u averagemarcus:${BITBUCKET_TOKEN} -H "Content-Type: application/json" -d '{"scm": "git", "is_private": false,"project": {"key": "PROJ"}}' "https://api.bitbucket.org/2.0/repositories/averagemarcus/${1}" --silent 1> /dev/null
|
curl -X POST -u averagemarcus:${BITBUCKET_TOKEN} -H "Content-Type: application/json" -d '{"scm": "git", "is_private": false,"project": {"key": "PROJ"}}' "https://api.bitbucket.org/2.0/repositories/averagemarcus/${1}" --silent1> /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
gitlabGetRepo() {
|
gitlabGetRepo() {
|
||||||
@ -62,21 +62,22 @@ for REPO in ${REPOS}; do
|
|||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
FAILED_MESSAGE="${FAILED_MESSAGE}\n⚠️ Failed to sync ${REPO}\n\n"
|
FAILED_MESSAGE="${FAILED_MESSAGE}\n⚠️ Failed to sync ${REPO}\n\n"
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
githubGetRepo ${REPO} || githubMakeRepo ${REPO}
|
githubGetRepo ${REPO} || githubMakeRepo ${REPO}
|
||||||
gitlabGetRepo ${REPO} || gitlabMakeRepo ${REPO}
|
gitlabGetRepo ${REPO} || gitlabMakeRepo ${REPO}
|
||||||
bitbucketGetRepo ${REPO} || bitbucketMakeRepo ${REPO}
|
bitbucketGetRepo ${REPO} || bitbucketMakeRepo ${REPO}
|
||||||
|
|
||||||
git pull --ff-only gitea ${BRANCH} 1> /dev/null || { failed; continue; }
|
git pull --ff-only gitea ${BRANCH} 1> /dev/null || failed
|
||||||
git pull --ff-only github ${BRANCH} 1> /dev/null || printf "\nℹ️ Unable to pull from GitHub\n\n"
|
git pull --ff-only github ${BRANCH} 1> /dev/null || printf "\nℹ️ Unable to pull from GitHub\n\n"
|
||||||
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 gitea ${BRANCH} 1> /dev/null || { failed; continue; }
|
git push gitea ${BRANCH} 1> /dev/null || failed
|
||||||
git push github ${BRANCH} 1> /dev/null || { failed; continue; }
|
git push github ${BRANCH} 1> /dev/null || failed
|
||||||
git push bitbucket ${BRANCH} 1> /dev/null || { failed; continue; }
|
git push bitbucket ${BRANCH} 1> /dev/null || failed
|
||||||
git push gitlab ${BRANCH} 1> /dev/null || { failed; continue; }
|
git push gitlab ${BRANCH} 1> /dev/null || failed
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf ${REPO}
|
rm -rf ${REPO}
|
||||||
|
Loading…
Reference in New Issue
Block a user