Browse Source

build: add script for generating release note

dev
Evan You 8 years ago
parent
commit
a7afcb4cca
  1. 2
      .gitignore
  2. 16
      build/gen-release-note.js
  3. 3
      build/release.sh
  4. 3
      package.json
  5. 45
      yarn.lock

2
.gitignore

@ -9,4 +9,4 @@ dist/vue.common.min.js
test/e2e/reports
test/e2e/screenshots
coverage
RELEASE_NOTE.md
RELEASE_NOTE*.md

16
build/gen-release-note.js

@ -0,0 +1,16 @@
const version = process.env.VERSION
const cc = require('conventional-changelog')
const file = `./RELEASE_NOTE_${version}.md`
const fileStream = require('fs').createWriteStream(file)
cc({
preset: 'angular',
pkg: {
transform (pkg) {
pkg.version = `v${version}`
return pkg
}
}
}).pipe(fileStream).on('close', () => {
console.log(`Generated release note at ${file}`)
})

3
build/release.sh

@ -58,4 +58,7 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
else
npm publish --tag $RELEASE_TAG
fi
# generate release note
VERSION=$VERSION npm run release:note
fi

3
package.json

@ -37,6 +37,7 @@
"bench:ssr": "npm run build:ssr && node benchmarks/ssr/renderToString.js && node benchmarks/ssr/renderToStream.js",
"release": "bash build/release.sh",
"release:weex": "bash build/release-weex.sh",
"release:note": "node build/gen-release-note.js",
"postinstall": "bash build/install-hooks.sh",
"commit": "git-cz"
},
@ -69,7 +70,7 @@
"chromedriver": "^2.30.1",
"codecov.io": "^0.1.6",
"commitizen": "^2.9.6",
"conventional-changelog-cli": "^1.3.1",
"conventional-changelog": "^1.1.3",
"cross-spawn": "^5.1.0",
"cz-conventional-changelog": "^2.0.0",
"de-indent": "^1.0.2",

45
yarn.lock

@ -50,10 +50,6 @@ acorn@^5.0.0, acorn@^5.0.1:
version "5.0.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d"
add-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa"
adm-zip@~0.4.3:
version "0.4.7"
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1"
@ -1269,7 +1265,7 @@ content-type@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed"
conventional-changelog-angular@^1.3.4:
conventional-changelog-angular@^1.3.3:
version "1.3.4"
resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.3.4.tgz#7d7cdfbd358948312904d02229a61fd6075cf455"
dependencies:
@ -1283,23 +1279,13 @@ conventional-changelog-atom@^0.1.0:
dependencies:
q "^1.4.1"
conventional-changelog-cli@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.1.tgz#1cd5a9dbae25ffb5ffe67afef1e136eaceefd2d5"
dependencies:
add-stream "^1.0.0"
conventional-changelog "^1.1.3"
lodash "^4.1.0"
meow "^3.7.0"
tempfile "^1.1.1"
conventional-changelog-codemirror@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.1.0.tgz#7577a591dbf9b538e7a150a7ee62f65a2872b334"
dependencies:
q "^1.4.1"
conventional-changelog-core@^1.9.0:
conventional-changelog-core@^1.8.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.0.tgz#de5dfbc091847656508d4a389e35c9a1bc49e7f4"
dependencies:
@ -1317,7 +1303,7 @@ conventional-changelog-core@^1.9.0:
read-pkg-up "^1.0.1"
through2 "^2.0.0"
conventional-changelog-ember@^0.2.6:
conventional-changelog-ember@^0.2.5:
version "0.2.6"
resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.6.tgz#8b7355419f5127493c4c562473ab2fc792f1c2b6"
dependencies:
@ -1370,14 +1356,14 @@ conventional-changelog-writer@^1.1.0:
through2 "^2.0.0"
conventional-changelog@^1.1.3:
version "1.1.4"
resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.4.tgz#108bc750c2a317e200e2f9b413caaa1f8c7efa3b"
version "1.1.3"
resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.3.tgz#26283078ac38c094df2af1604b0a46bbc0165c4d"
dependencies:
conventional-changelog-angular "^1.3.4"
conventional-changelog-angular "^1.3.3"
conventional-changelog-atom "^0.1.0"
conventional-changelog-codemirror "^0.1.0"
conventional-changelog-core "^1.9.0"
conventional-changelog-ember "^0.2.6"
conventional-changelog-core "^1.8.0"
conventional-changelog-ember "^0.2.5"
conventional-changelog-eslint "^0.1.0"
conventional-changelog-express "^0.1.0"
conventional-changelog-jquery "^0.1.0"
@ -3547,7 +3533,7 @@ lodash@4.17.2:
version "4.17.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"
lodash@^4.0.0, lodash@^4.0.1, lodash@^4.1.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.8.0:
lodash@^4.0.0, lodash@^4.0.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.8.0:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
@ -3629,7 +3615,7 @@ memory-fs@^0.4.0, memory-fs@~0.4.1:
errno "^0.1.3"
readable-stream "^2.0.1"
meow@^3.3.0, meow@^3.7.0:
meow@^3.3.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
dependencies:
@ -5170,13 +5156,6 @@ tar@^2.2.1:
fstream "^1.0.2"
inherits "2"
tempfile@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2"
dependencies:
os-tmpdir "^1.0.0"
uuid "^2.0.1"
test-exclude@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26"
@ -5398,10 +5377,6 @@ utils-merge@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8"
uuid@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
uuid@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1"

Loading…
Cancel
Save