Commit 11b48b63 authored by qingwei.li's avatar qingwei.li Committed by cinwell.li

travis: fix shell

parent 3e03ae29
#! /bin/sh #! /bin/sh
mkdir temp_web && cd temp_web mkdir temp_web
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$GH_TOKEN" ]; then if [ "$TRAVIS_BRANCH" = "master" ] && [ "$GH_TOKEN" ]; then
CI_ENV=/dev/ ./node_modules/.bin/cooking build -c build/cooking.demo.js CI_ENV=/dev/ ./node_modules/.bin/cooking build -c build/cooking.demo.js
cd temp_web
git clone https://$GH_TOKEN@github.com/ElementUI/dev.git && cd dev git clone https://$GH_TOKEN@github.com/ElementUI/dev.git && cd dev
git config user.name "$TRAVIS_COMMIT_USER" git config user.name "$TRAVIS_COMMIT_USER"
git config user.email "$TRAVIS_COMMIT_EMAIL" git config user.email "$TRAVIS_COMMIT_EMAIL"
...@@ -11,11 +12,12 @@ if [ "$TRAVIS_BRANCH" = "master" ] && [ "$GH_TOKEN" ]; then ...@@ -11,11 +12,12 @@ if [ "$TRAVIS_BRANCH" = "master" ] && [ "$GH_TOKEN" ]; then
git add -A . git add -A .
git commit -m "$TRAVIS_COMMIT_MSG" git commit -m "$TRAVIS_COMMIT_MSG"
git push origin master git push origin master
cd .. cd ../..
fi fi
if [ "$TRAVIS_TAG" ] && [ "$GH_TOKEN" ]; then if [ "$TRAVIS_TAG" ] && [ "$GH_TOKEN" ]; then
npm run dist npm run dist
cd temp_web
git clone https://$GH_TOKEN@github.com/ElementUI/lib.git && cd lib git clone https://$GH_TOKEN@github.com/ElementUI/lib.git && cd lib
git config user.name "$TRAVIS_COMMIT_USER" git config user.name "$TRAVIS_COMMIT_USER"
git config user.email "$TRAVIS_COMMIT_EMAIL" git config user.email "$TRAVIS_COMMIT_EMAIL"
...@@ -25,5 +27,5 @@ if [ "$TRAVIS_TAG" ] && [ "$GH_TOKEN" ]; then ...@@ -25,5 +27,5 @@ if [ "$TRAVIS_TAG" ] && [ "$GH_TOKEN" ]; then
git commit -m "[build] $TRAVIS_TAG" git commit -m "[build] $TRAVIS_TAG"
git tag $TRAVIS_TAG git tag $TRAVIS_TAG
git push origin master --tags git push origin master --tags
cd .. cd ../..
fi fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment