mirror of https://github.com/ElemeFE/element
Update ci
parent
00cfee91bf
commit
7b263b89ae
|
@ -26,7 +26,7 @@ cooking.set({
|
||||||
favicon: './examples/favicon.ico'
|
favicon: './examples/favicon.ico'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
publicPath: process.env.CI_ENV || '/',
|
publicPath: process.env.CI_ENV || '',
|
||||||
hash: true,
|
hash: true,
|
||||||
devServer: {
|
devServer: {
|
||||||
port: 8085,
|
port: 8085,
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
mkdir temp_web
|
mkdir temp_web
|
||||||
|
git config --global user.name "element_bot"
|
||||||
|
git config --global user.email "element_bot"
|
||||||
|
|
||||||
# build dev site
|
# build dev site
|
||||||
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$GH_TOKEN" ]; then
|
if [ "$GH_TOKEN" ]; then
|
||||||
npm run deploy:dev
|
npm run build:file && CI_ENV=/dev/$TRAVIS_BRANCH/ node_modules/.bin/cooking build -c build/cooking.demo.js
|
||||||
cd temp_web
|
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 "element_bot"
|
mkdir $TRAVIS_BRANCH
|
||||||
git config user.email "element_bot"
|
rm -rf $TRAVIS_BRANCH/**
|
||||||
rm -rf `find * ! -name README.md`
|
cp -rf ../../examples/element-ui/** $TRAVIS_BRANCH/
|
||||||
cp -rf ../../examples/element-ui/** .
|
|
||||||
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
|
||||||
|
@ -17,26 +18,25 @@ if [ "$TRAVIS_BRANCH" = "master" ] && [ "$GH_TOKEN" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# push theme-default
|
# push theme-default
|
||||||
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$GH_TOKEN" ]; then
|
if [ "$GH_TOKEN" ]; then
|
||||||
cd temp_web
|
cd temp_web
|
||||||
git clone https://$GH_TOKEN@github.com/ElementUI/theme-default.git && cd theme-default
|
git clone -b $TRAVIS_BRANCH https://$GH_TOKEN@github.com/ElementUI/theme-default.git && cd theme-default
|
||||||
git config user.name "element_bot"
|
|
||||||
git config user.email "element_bot"
|
|
||||||
rm -rf *
|
rm -rf *
|
||||||
cp -rf ../../packages/theme-default/** .
|
cp -rf ../../packages/theme-default/** .
|
||||||
git add -A .
|
git add -A .
|
||||||
git commit -m "$TRAVIS_COMMIT_MSG"
|
git commit -m "$TRAVIS_COMMIT_MSG"
|
||||||
git push origin master --tags
|
git push origin $TRAVIS_BRANCH
|
||||||
cd ../..
|
cd ../..
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$TRAVIS_TAG" ] && [ "$GH_TOKEN" ]; then
|
if [ "$TRAVIS_TAG" ] && [ "$GH_TOKEN" ]; then
|
||||||
|
# site sub folder
|
||||||
|
SUB_FOLDER=$(echo $TRAVIS_TAG | grep -o -E '^\d+\.\d+')
|
||||||
|
|
||||||
# build lib
|
# build lib
|
||||||
npm run dist
|
npm run dist
|
||||||
cd temp_web
|
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 "element_bot"
|
|
||||||
git config user.email "element_bot"
|
|
||||||
rm -rf `find * ! -name README.md`
|
rm -rf `find * ! -name README.md`
|
||||||
cp -rf ../../lib/** .
|
cp -rf ../../lib/** .
|
||||||
git add -A .
|
git add -A .
|
||||||
|
@ -48,8 +48,6 @@ if [ "$TRAVIS_TAG" ] && [ "$GH_TOKEN" ]; then
|
||||||
# build theme-default
|
# build theme-default
|
||||||
cd temp_web
|
cd temp_web
|
||||||
git clone https://$GH_TOKEN@github.com/ElementUI/theme-default.git && cd theme-default
|
git clone https://$GH_TOKEN@github.com/ElementUI/theme-default.git && cd theme-default
|
||||||
git config user.name "element_bot"
|
|
||||||
git config user.email "element_bot"
|
|
||||||
rm -rf *
|
rm -rf *
|
||||||
cp -rf ../../packages/theme-default/** .
|
cp -rf ../../packages/theme-default/** .
|
||||||
git add -A .
|
git add -A .
|
||||||
|
@ -61,12 +59,14 @@ if [ "$TRAVIS_TAG" ] && [ "$GH_TOKEN" ]; then
|
||||||
# build site
|
# build site
|
||||||
npm run deploy:build
|
npm run deploy:build
|
||||||
cd temp_web
|
cd temp_web
|
||||||
git clone https://$GH_TOKEN@github.com/ElemeFE/element.git && cd element
|
git clone -b gh-pages https://$GH_TOKEN@github.com/ElemeFE/element.git && cd element
|
||||||
git config user.name "element_bot"
|
|
||||||
git config user.email "element_bot"
|
# only remove files
|
||||||
git checkout gh-pages
|
mkdir $SUB_FOLDER
|
||||||
rm -rf `find * ! -name README.md`
|
rm -f *
|
||||||
|
rm -rf $SUB_FOLDER/**
|
||||||
cp -rf ../../examples/element-ui/** .
|
cp -rf ../../examples/element-ui/** .
|
||||||
|
cp -rf ../../examples/element-ui/** $SUB_FOLDER/
|
||||||
git add -A .
|
git add -A .
|
||||||
git commit -m "$TRAVIS_COMMIT_MSG"
|
git commit -m "$TRAVIS_COMMIT_MSG"
|
||||||
git push origin gh-pages
|
git push origin gh-pages
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
git checkout dev
|
||||||
|
git pull eleme dev --rebase
|
||||||
|
git checkout master
|
||||||
|
git merge dev
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
echo "Enter release version: "
|
echo "Enter release version: "
|
||||||
read VERSION
|
read VERSION
|
||||||
|
|
|
@ -16,14 +16,13 @@
|
||||||
"clean": "rimraf lib && rimraf packages/*/lib && rimraf test/**/coverage && lerna clean --yes",
|
"clean": "rimraf lib && rimraf packages/*/lib && rimraf test/**/coverage && lerna clean --yes",
|
||||||
"deploy": "npm run deploy:build && gh-pages -d examples/element-ui --remote eleme && del examples/element-ui",
|
"deploy": "npm run deploy:build && gh-pages -d examples/element-ui --remote eleme && del examples/element-ui",
|
||||||
"deploy:build": "npm run build:file && cooking build -c build/cooking.demo.js -p && echo element.eleme.io>>examples/element-ui/CNAME",
|
"deploy:build": "npm run build:file && cooking build -c build/cooking.demo.js -p && echo element.eleme.io>>examples/element-ui/CNAME",
|
||||||
"deploy:dev": "npm run build:file && CI_ENV=/dev/ cooking build -c build/cooking.demo.js",
|
|
||||||
"dev": "npm run bootstrap && npm run build:file && cooking watch -c build/cooking.demo.js -p",
|
"dev": "npm run bootstrap && npm run build:file && cooking watch -c build/cooking.demo.js -p",
|
||||||
"dev:play": "npm run build:file && cross-env PLAY_ENV=true cooking watch -c build/cooking.demo.js -p",
|
"dev:play": "npm run build:file && cross-env PLAY_ENV=true cooking watch -c build/cooking.demo.js -p",
|
||||||
"dist": "npm run clean && npm run build:file && npm run lint && cooking build -c build/cooking.conf.js,build/cooking.common.js,build/cooking.component.js -p && npm run build:utils && npm run build:theme",
|
"dist": "npm run clean && npm run build:file && npm run lint && cooking build -c build/cooking.conf.js,build/cooking.common.js,build/cooking.component.js -p && npm run build:utils && npm run build:theme",
|
||||||
"dist:all": "node build/bin/build-all.js && npm run build:theme",
|
"dist:all": "node build/bin/build-all.js && npm run build:theme",
|
||||||
"i18n": "node build/bin/i18n.js",
|
"i18n": "node build/bin/i18n.js",
|
||||||
"lint": "eslint src/**/* test/**/* packages/**/*.{js,vue} build/**/* --quiet",
|
"lint": "eslint src/**/* test/**/* packages/**/*.{js,vue} build/**/* --quiet",
|
||||||
"pub": "git checkout master && git pull eleme master --rebase && sh build/release.sh",
|
"pub": "sh build/release.sh",
|
||||||
"pub:all": "npm run dist:all && lerna publish",
|
"pub:all": "npm run dist:all && lerna publish",
|
||||||
"test": "npm run lint && CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run",
|
"test": "npm run lint && CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run",
|
||||||
"test:watch": "karma start test/unit/karma.conf.js"
|
"test:watch": "karma start test/unit/karma.conf.js"
|
||||||
|
|
Loading…
Reference in New Issue