Fix dot support for Gitlab

This commit is contained in:
Marcus Noble 2020-12-13 17:14:28 +00:00
parent 7d6af7b8a2
commit b178e0f034

View File

@ -35,7 +35,7 @@ bitbucketMakeRepo() {
} }
gitlabGetRepo() { gitlabGetRepo() {
curl -f "https://gitlab.com/api/v4/projects/averagemarcus%2F${1}?private_token=${GITLAB_TOKEN}" --silent 1> /dev/null curl -f "https://gitlab.com/api/v4/projects/averagemarcus%2F$(echo ${1} |tr "." "-")?private_token=${GITLAB_TOKEN}" --silent 1> /dev/null
} }
gitlabMakeRepo() { gitlabMakeRepo() {
echo "Creating gitlab repo" echo "Creating gitlab repo"
@ -55,7 +55,7 @@ for REPO in ${REPOS}; do
git remote add gitea "${GITEA_BASE}${REPO}" 1> /dev/null git remote add gitea "${GITEA_BASE}${REPO}" 1> /dev/null
git remote add github "${GITHUB_BASE}${REPO}" 1> /dev/null git remote add github "${GITHUB_BASE}${REPO}" 1> /dev/null
git remote add bitbucket "${BITBUCKET_BASE}${REPO}" 1> /dev/null git remote add bitbucket "${BITBUCKET_BASE}${REPO}" 1> /dev/null
git remote add gitlab "${GITLAB_BASE}${REPO}" 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}\n\n"
@ -86,6 +86,7 @@ done
if [ -n "${FAILED_MESSAGE}" ]; if [ -n "${FAILED_MESSAGE}" ];
then then
printf "\n\n--------\n\n"
echo "Failed!" echo "Failed!"
printf "${FAILED_MESSAGE}" printf "${FAILED_MESSAGE}"
exit 1 exit 1