]> granicus.if.org Git - esp-idf/commitdiff
ci: Fix master branch being pushed to master
authorAngus Gratton <angus@espressif.com>
Fri, 17 Mar 2017 04:00:25 +0000 (12:00 +0800)
committerAngus Gratton <angus@espressif.com>
Fri, 17 Mar 2017 04:02:46 +0000 (12:02 +0800)
Previous change in 8b6993f7 doesn't work if branch exists locally.

.gitlab-ci.yml

index 9818930c99b37c79b107e34368a5b0b9b64d8f6c..12714959b2847e00b43201f70faa918408ed6981 100644 (file)
@@ -241,7 +241,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: