File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 33 - ' 0.10'
44
55before_install :
6- - ' git checkout -B master ' # Reconcile detached HEAD
6+ - ' git checkout -B $TRAVIS_BRANCH ' # Reconcile detached HEAD
77 - ' npm install -g bower grunt-cli'
88
99script :
Original file line number Diff line number Diff line change @@ -21,9 +21,19 @@ git add dist --force
2121git commit -m " Added files generated by Travis build"
2222
2323# Push to releases branch
24+ EXISTING=` git ls-remote --heads https://github.com/" $TRAVIS_REPO_SLUG " .git " $TRAVIS_BRANCH " -dist`
25+
2426if [ -z " $TRAVIS_TAG " ]
2527then
26- git push upstream $TRAVIS_BRANCH :$TRAVIS_BRANCH -dist --force -v
28+ if [ -n " $EXISTING " ]
29+ then
30+ git fetch upstream $TRAVIS_BRANCH -dist:$TRAVIS_BRANCH -dist
31+ git checkout $TRAVIS_BRANCH -dist
32+ git merge -Xtheirs $TRAVIS_BRANCH --no-edit --ff
33+ git push upstream $TRAVIS_BRANCH -dist --force -v
34+ else
35+ git push upstream $TRAVIS_BRANCH :$TRAVIS_BRANCH -dist --force -v
36+ fi
2737fi
2838
29- exit $?
39+ exit $?
You can’t perform that action at this time.
0 commit comments