From 7cd1e0ef4b2790d235fe86fd2e4cb51c72840b36 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Fri, 17 Mar 2017 12:00:25 +0800 Subject: [PATCH] ci: Fix master branch being pushed to master Previous change in 8b6993f7 doesn't work if branch exists locally. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3743df9f15..dc8f5f6b89 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -240,7 +240,7 @@ push_master_to_github: # # NB: In gitlab 9.x, CI_BUILD_REF was deprecated. New name is CI_COMMIT_REF. If below command suddenly # generates bash syntax errors, this is probably why. - - eval $(git for-each-ref --shell bash --format 'if [ $CI_BUILD_REF == %(objectname) ]; then git checkout -b %(refname:strip=3); git push --follow-tags github %(refname:strip=3); fi;' $GITHUB_PUSH_REFS) + - eval $(git for-each-ref --shell bash --format 'if [ $CI_BUILD_REF == %(objectname) ]; then git checkout -B %(refname:strip=3); git push --follow-tags github %(refname:strip=3); fi;' $GITHUB_PUSH_REFS) deploy_docs: -- 2.49.0