From a53a6fccee18b06295dfceb1117f82401321a630 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Wed, 19 Oct 2016 07:25:10 +0200 Subject: [PATCH] Working on issue not syncing to github correctly. --- script/build/sync_repo.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/script/build/sync_repo.sh b/script/build/sync_repo.sh index 273458f10..1a6ea4ed6 100755 --- a/script/build/sync_repo.sh +++ b/script/build/sync_repo.sh @@ -10,7 +10,17 @@ if echo $CI_BUILD_REF_NAME | grep private; then fi git checkout $CI_BUILD_REF_NAME -git pull --rebase origin $CI_BUILD_REF_NAME -if git remote | grep github > /dev/null; then git remote rm github; fi +if [ "$CI_BUILD_REF_NAME" != "$CI_BUILD_TAG" ]; then + git pull --rebase origin $CI_BUILD_REF_NAME +fi + +if git remote | grep github > /dev/null; then + git remote rm github +fi git remote add github $GITHUB_DEST -git push github $CI_BUILD_REF_NAME + +if [ "$CI_BUILD_REF_NAME" != "$CI_BUILD_TAG" ]; then + git push github $CI_BUILD_REF_NAME +else + git push github --tags +fi