From cee315430484f2cb1d8576e8f19f952da2d24f3b Mon Sep 17 00:00:00 2001 From: Leopoldthecoder Date: Thu, 26 Oct 2017 12:50:28 +0800 Subject: [PATCH] update release scripts --- build/deploy-ci.sh | 5 +- build/deploy-faas.sh | 5 +- build/git-release.sh | 2 +- build/release.sh | 22 ++++- examples/components/demo-block.vue | 5 +- examples/components/header.vue | 6 +- examples/docs/en-US/installation.md | 14 ++-- examples/docs/en-US/quickstart.md | 122 ++-------------------------- examples/docs/zh-CN/installation.md | 14 ++-- examples/docs/zh-CN/quickstart.md | 122 ++-------------------------- 10 files changed, 60 insertions(+), 257 deletions(-) diff --git a/build/deploy-ci.sh b/build/deploy-ci.sh index bb541d62e..a99c4abf0 100644 --- a/build/deploy-ci.sh +++ b/build/deploy-ci.sh @@ -42,11 +42,10 @@ if [ "$TRAVIS_TAG" ]; then SUB_FOLDER='2.0' mkdir $SUB_FOLDER - # rm -rf *.js *.css *.map static + rm -rf *.js *.css *.map static rm -rf $SUB_FOLDER/** - # cp -rf ../../examples/element-ui/** . + cp -rf ../../examples/element-ui/** . cp -rf ../../examples/element-ui/** $SUB_FOLDER/ - cp -rf ../../examples/element-ui/versions.json . git add -A . git commit -m "$TRAVIS_COMMIT_MSG" git push origin gh-pages diff --git a/build/deploy-faas.sh b/build/deploy-faas.sh index 035acde35..e65db9ed2 100644 --- a/build/deploy-faas.sh +++ b/build/deploy-faas.sh @@ -7,11 +7,10 @@ git clone -b gh-pages https://github.com/ElemeFE/element.git && cd element # build sub folder SUB_FOLDER='2.0' mkdir $SUB_FOLDER -# rm -rf *.js *.css *.map static +rm -rf *.js *.css *.map static rm -rf $SUB_FOLDER/** -# cp -rf ../../examples/element-ui/** . +cp -rf ../../examples/element-ui/** . cp -rf ../../examples/element-ui/** $SUB_FOLDER/ -cp -rf ../../examples/element-ui/versions.json . cd ../.. # deploy domestic site diff --git a/build/git-release.sh b/build/git-release.sh index 521c986b6..2795b7a60 100644 --- a/build/git-release.sh +++ b/build/git-release.sh @@ -1,5 +1,5 @@ #!/usr/bin/env sh -git checkout carbon +git checkout dev if test -n "$(git status --porcelain)"; then echo 'Unclean working tree. Commit or stash changes first.' >&2; diff --git a/build/release.sh b/build/release.sh index 0ee167144..1f6dccc2e 100644 --- a/build/release.sh +++ b/build/release.sh @@ -1,3 +1,6 @@ +git checkout master +git merge dev + #!/usr/bin/env sh set -e echo "Enter release version: " @@ -16,7 +19,12 @@ then echo "Releasing theme-chalk $VERSION ..." cd packages/theme-chalk npm version $VERSION --message "[release] $VERSION" - npm publish + if [[ $VERSION =~ "beta" ]] + then + npm publish --tag beta + else + npm publish + fi cd ../.. # commit @@ -25,8 +33,16 @@ then npm version $VERSION --message "[release] $VERSION" # publish - git push eleme carbon + git push eleme master git push eleme refs/tags/v$VERSION + git checkout dev + git rebase master + git push eleme dev - npm publish --tag next + if [[ $VERSION =~ "beta" ]] + then + npm publish --tag beta + else + npm publish + fi fi diff --git a/examples/components/demo-block.vue b/examples/components/demo-block.vue index 864fda536..ae29f29c5 100644 --- a/examples/components/demo-block.vue +++ b/examples/components/demo-block.vue @@ -178,6 +178,7 @@ + ``` ### Hello world -If you are using CDN, a hello-world page is easy with Element. [Online Demo](https://jsfiddle.net/leopoldthecuber/hzfpyvg6/1/) +If you are using CDN, a hello-world page is easy with Element. [Online Demo](https://jsfiddle.net/hzfpyvg6/14/) ```html @@ -26,7 +26,7 @@ If you are using CDN, a hello-world page is easy with Element. [Online Demo](htt - +
@@ -39,7 +39,7 @@ If you are using CDN, a hello-world page is easy with Element. [Online Demo](htt - + + ``` ### Hello world -通过 CDN 的方式我们可以很容易地使用 Element 写出一个 Hello world 页面。[在线演示](https://jsfiddle.net/leopoldthecuber/hzfpyvg6/1/) +通过 CDN 的方式我们可以很容易地使用 Element 写出一个 Hello world 页面。[在线演示](https://jsfiddle.net/hzfpyvg6/14/) ```html @@ -26,7 +26,7 @@ npm i element-ui@next -S - +
@@ -39,7 +39,7 @@ npm i element-ui@next -S - +