Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ git add dist --force
git commit -m "Added files generated by Travis build"

# Push to dist branch
git push upstream $TRAVIS_BRANCH:$TRAVIS_BRANCH-dist --force -v
EXISTING=`git ls-remote --heads https://github.com/"$TRAVIS_REPO_SLUG".git "$TRAVIS_BRANCH"-dist`

if [ -n "$EXISTING" ]
then
git fetch upstream $TRAVIS_BRANCH-dist:$TRAVIS_BRANCH-dist
git checkout $TRAVIS_BRANCH-dist
git merge -Xtheirs $TRAVIS_BRANCH --no-edit --ff
git push upstream $TRAVIS_BRANCH-dist --force -v
else
git push upstream $TRAVIS_BRANCH:$TRAVIS_BRANCH-dist --force -v
fi

exit $?