Merge pull request #704 from QingWei-Li/feat/auto-bulild-lib

Add auto build lib
pull/706/head
杨奕 2016-10-28 18:00:59 +08:00 committed by GitHub
commit 45f254a8fa
1 changed files with 16 additions and 2 deletions

View File

@ -1,9 +1,8 @@
#! /bin/sh
mkdir temp_web && cd temp_web
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$GH_TOKEN" ]; then
CI_ENV=/dev/ ./node_modules/.bin/cooking build -c build/cooking.demo.js
mkdir temp_web
cd temp_web
git clone https://$GH_TOKEN@github.com/ElementUI/dev.git && cd dev
git config user.name "$TRAVIS_COMMIT_USER"
git config user.email "$TRAVIS_COMMIT_EMAIL"
@ -12,4 +11,19 @@ if [ "$TRAVIS_BRANCH" = "master" ] && [ "$GH_TOKEN" ]; then
git add -A .
git commit -m "$TRAVIS_COMMIT_MSG"
git push origin master
cd ..
fi
if [ "$TRAVIS_TAG" ] && [ "$GH_TOKEN" ]; then
npm run dist
git clone https://$GH_TOKEN@github.com/ElementUI/lib.git && cd lib
git config user.name "$TRAVIS_COMMIT_USER"
git config user.email "$TRAVIS_COMMIT_EMAIL"
rm -rf *
cp -rf ../../lib/** .
git add -A .
git commit -m "[build] $TRAVIS_TAG"
git tag $TRAVIS_TAG
git push origin master --tags
cd ..
fi