1 | #!/bin/bash
|
2 | echo "Deploy dist to dist branch.";
|
3 | REV=`git rev-parse HEAD`;
|
4 | BRANCH=`git rev-parse --abbrev-ref HEAD`;
|
5 | DIST_BRANCH=${1:-dist};
|
6 | test "$(git config user.name)" = '' && (
|
7 | git config user.name "leancloud-bot";
|
8 | git config user.email "ci@leancloud.cn";
|
9 | )
|
10 | git add dist -f;
|
11 | git add plugins/typed-messages/dist -f;
|
12 | git add plugins/webrtc/dist -f;
|
13 | git add plugins/groupchat-receipts/dist -f;
|
14 | git add plugins/live-query/dist -f;
|
15 | git commit -m "chore(build): build ${REV} [skip ci]";
|
16 | git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git ${BRANCH}:${DIST_BRANCH} > /dev/null 2>&1;
|
17 | git reset HEAD~1;
|
18 | echo "done.";
|