Loading gitlab-ci.yml +5 −7 Original line number Diff line number Diff line Loading @@ -52,11 +52,9 @@ sync: script: - echo "[${GIT_PULL_REPO}#${GIT_PULL_BRANCH:-master}] -> [${GIT_PUSH_REPO}#${GIT_PUSH_BRANCH:-master}]" - rm -rf /tmp/repo - git clone "${GIT_PUSH_REPO}" /tmp/repo - git clone "${GIT_PULL_REPO}" -b "${GIT_PULL_BRANCH:-master}" /tmp/repo - cd /tmp/repo - git checkout "${GIT_PUSH_BRANCH:-master}" - git remote add upstream "${GIT_PULL_REPO}" - test -n "${GIT_TAGS}" && git fetch upstream --tags || true - git pull --ff-only upstream "${GIT_PULL_BRANCH:-master}" - git push --force origin "${GIT_PUSH_BRANCH:-master}" - test -n "${GIT_TAGS}" && git push --force origin --tags || true - test -n "${GIT_TAGS}" && git fetch --tags || true - git remote add downstream "${GIT_PUSH_REPO}" - git push --force downstream "${GIT_PUSH_BRANCH:-master}" - test -n "${GIT_TAGS}" && git push --force downstream --tags || true Loading
gitlab-ci.yml +5 −7 Original line number Diff line number Diff line Loading @@ -52,11 +52,9 @@ sync: script: - echo "[${GIT_PULL_REPO}#${GIT_PULL_BRANCH:-master}] -> [${GIT_PUSH_REPO}#${GIT_PUSH_BRANCH:-master}]" - rm -rf /tmp/repo - git clone "${GIT_PUSH_REPO}" /tmp/repo - git clone "${GIT_PULL_REPO}" -b "${GIT_PULL_BRANCH:-master}" /tmp/repo - cd /tmp/repo - git checkout "${GIT_PUSH_BRANCH:-master}" - git remote add upstream "${GIT_PULL_REPO}" - test -n "${GIT_TAGS}" && git fetch upstream --tags || true - git pull --ff-only upstream "${GIT_PULL_BRANCH:-master}" - git push --force origin "${GIT_PUSH_BRANCH:-master}" - test -n "${GIT_TAGS}" && git push --force origin --tags || true - test -n "${GIT_TAGS}" && git fetch --tags || true - git remote add downstream "${GIT_PUSH_REPO}" - git push --force downstream "${GIT_PUSH_BRANCH:-master}" - test -n "${GIT_TAGS}" && git push --force downstream --tags || true