From c532b29662d7763fd7644dba79042d862386e457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Fri, 22 Sep 2017 19:44:48 +0800 Subject: [PATCH] saperate changelog generater from build.sh --- build/build-changelog.sh | 20 +++++++ build/release.sh | 19 ------ docs/examples-docs/changelog-generated.md | 72 +++++++++++++++++++++++ package.json | 1 + yarn.lock | 4 +- 5 files changed, 95 insertions(+), 21 deletions(-) create mode 100644 build/build-changelog.sh create mode 100644 docs/examples-docs/changelog-generated.md diff --git a/build/build-changelog.sh b/build/build-changelog.sh new file mode 100644 index 000000000..57b57c9df --- /dev/null +++ b/build/build-changelog.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +if ! command_exists github_changelog_generator ; then + fail 'github_changelog_generator is required to publish packages' +fi + +if [ -z "$CHANGELOG_GITHUB_TOKEN" ] ; then + fail 'You must set CHANGELOG_GITHUB_TOKEN environment variable\nhttps://github.com/skywinder/github-changelog-generator#github-token' +fi + +basepath=$(dirname $0) + +github_changelog_generator \ + --header-label "## 更新日志" \ + --bugs-label "**修复:**" \ + --enhancement-label "**非兼容更新和新特性:**" \ + --issues-label "**处理的 Issue:**" \ + --pr-label "**合并的 Pull Request (可能有不兼容改动):**" \ + --no-unreleased \ + -o $basepath/../docs/examples-docs/changelog-generated.md diff --git a/build/release.sh b/build/release.sh index 463c07e92..247684c63 100644 --- a/build/release.sh +++ b/build/release.sh @@ -1,16 +1,6 @@ git checkout master git merge dev -basepath=$(dirname $0) - -if ! command_exists github_changelog_generator ; then - fail 'github_changelog_generator is required to publish packages' -fi - -if [ -z "$CHANGELOG_GITHUB_TOKEN" ] ; then - fail 'You must set CHANGELOG_GITHUB_TOKEN environment variable\nhttps://github.com/skywinder/github-changelog-generator#github-token' -fi - #!/usr/bin/env sh set -e echo "Enter release version: " @@ -22,15 +12,6 @@ if [[ $REPLY =~ ^[Yy]$ ]] then echo "Releasing $VERSION ..." - github_changelog_generator \ - --header-label "## 更新日志" \ - --bugs-label "**修复:**" \ - --enhancement-label "**非兼容更新和新特性:**" \ - --issues-label "**处理的 Issue:**" \ - --pr-label "**合并的 Pull Request (可能有不兼容改动):**" \ - --no-unreleased \ - -o $basepath/../docs/examples-docs/changelog.md - # build VERSION=$VERSION npm run dist diff --git a/docs/examples-docs/changelog-generated.md b/docs/examples-docs/changelog-generated.md new file mode 100644 index 000000000..f31018364 --- /dev/null +++ b/docs/examples-docs/changelog-generated.md @@ -0,0 +1,72 @@ +## 更新日志 + +## [v0.7.6](https://github.com/chenjiahan/vant/tree/v0.7.6) (2017-08-08) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.7.5...v0.7.6) + +## [v0.7.5](https://github.com/chenjiahan/vant/tree/v0.7.5) (2017-08-08) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.7.3...v0.7.5) + +## [v0.7.3](https://github.com/chenjiahan/vant/tree/v0.7.3) (2017-08-04) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.7.2...v0.7.3) + +## [v0.7.2](https://github.com/chenjiahan/vant/tree/v0.7.2) (2017-07-31) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.6.6...v0.7.2) + +## [v0.6.6](https://github.com/chenjiahan/vant/tree/v0.6.6) (2017-07-15) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.6.5...v0.6.6) + +## [v0.6.5](https://github.com/chenjiahan/vant/tree/v0.6.5) (2017-07-11) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.6.4...v0.6.5) + +## [v0.6.4](https://github.com/chenjiahan/vant/tree/v0.6.4) (2017-07-06) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.6.3...v0.6.4) + +## [v0.6.3](https://github.com/chenjiahan/vant/tree/v0.6.3) (2017-07-04) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.6.2...v0.6.3) + +## [v0.6.2](https://github.com/chenjiahan/vant/tree/v0.6.2) (2017-06-26) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.6.1...v0.6.2) + +## [v0.6.1](https://github.com/chenjiahan/vant/tree/v0.6.1) (2017-06-19) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.6.0...v0.6.1) + +## [v0.6.0](https://github.com/chenjiahan/vant/tree/v0.6.0) (2017-06-15) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.5.12...v0.6.0) + +## [v0.5.12](https://github.com/chenjiahan/vant/tree/v0.5.12) (2017-06-02) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.5.11...v0.5.12) + +## [v0.5.11](https://github.com/chenjiahan/vant/tree/v0.5.11) (2017-05-25) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.5.10...v0.5.11) + +## [v0.5.10](https://github.com/chenjiahan/vant/tree/v0.5.10) (2017-05-25) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.5.9...v0.5.10) + +## [v0.5.9](https://github.com/chenjiahan/vant/tree/v0.5.9) (2017-05-25) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.5.8...v0.5.9) + +## [v0.5.8](https://github.com/chenjiahan/vant/tree/v0.5.8) (2017-05-25) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.5.7...v0.5.8) + +## [v0.5.7](https://github.com/chenjiahan/vant/tree/v0.5.7) (2017-05-19) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.5.6...v0.5.7) + +## [v0.5.6](https://github.com/chenjiahan/vant/tree/v0.5.6) (2017-05-15) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.5.4...v0.5.6) + +## [v0.5.4](https://github.com/chenjiahan/vant/tree/v0.5.4) (2017-05-09) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.5.3...v0.5.4) + +## [v0.5.3](https://github.com/chenjiahan/vant/tree/v0.5.3) (2017-04-27) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.5.2...v0.5.3) + +## [v0.5.2](https://github.com/chenjiahan/vant/tree/v0.5.2) (2017-04-26) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.5.1...v0.5.2) + +## [v0.5.1](https://github.com/chenjiahan/vant/tree/v0.5.1) (2017-04-24) +[Full Changelog](https://github.com/chenjiahan/vant/compare/v0.5.0...v0.5.1) + +## [v0.5.0](https://github.com/chenjiahan/vant/tree/v0.5.0) (2017-04-23) + + +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/package.json b/package.json index 4fa8a215d..e5822c219 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "build:vant-css": "gulp build --gulpfile packages/vant-css/gulpfile.js --color && mkdir lib/vant-css && cp -R packages/vant-css/lib/ lib/vant-css", "build:vant": "cross-env NODE_ENV=production webpack --progress --hide-modules --color --config build/webpack.build.js && cross-env NODE_ENV=production webpack -p --progress --hide-modules --color --config build/webpack.build.js", "build:style-entry": "VUE_ENV=server node build/bin/build-style-entry.js", + "build:changelog": "sh build/build-changelog.sh", "deploy": "npm run deploy:docs && npm run deploy:cdn && gh-pages -d docs/dist --remote youzan && rimraf docs/dist", "deploy:cdn": "superman cdn /zanui/vue docs/dist/*.js docs/dist/*.css", "deploy:docs": "rimraf docs/dist && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.config.prod.js", diff --git a/yarn.lock b/yarn.lock index 239a9615c..c7ecbad40 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7660,8 +7660,8 @@ yeast@0.1.2: resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" zan-doc@^0.2.12: - version "0.2.16" - resolved "https://registry.yarnpkg.com/zan-doc/-/zan-doc-0.2.16.tgz#dd458f0a807dea814b412a609679a63a20960077" + version "0.2.17" + resolved "https://registry.yarnpkg.com/zan-doc/-/zan-doc-0.2.17.tgz#bea711d254d89121b52b47792aec5127fe66fedf" dependencies: cheerio "0.22.0" decamelize "^1.2.0"