UNPKG

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