Skip to content

Commit a7afcb4

Browse files
committed
build: add script for generating release note
1 parent b49c969 commit a7afcb4

File tree

5 files changed

+32
-37
lines changed

5 files changed

+32
-37
lines changed

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ dist/vue.common.min.js
99
test/e2e/reports
1010
test/e2e/screenshots
1111
coverage
12-
RELEASE_NOTE.md
12+
RELEASE_NOTE*.md

Diff for: build/gen-release-note.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const version = process.env.VERSION
2+
const cc = require('conventional-changelog')
3+
const file = `./RELEASE_NOTE_${version}.md`
4+
const fileStream = require('fs').createWriteStream(file)
5+
6+
cc({
7+
preset: 'angular',
8+
pkg: {
9+
transform (pkg) {
10+
pkg.version = `v${version}`
11+
return pkg
12+
}
13+
}
14+
}).pipe(fileStream).on('close', () => {
15+
console.log(`Generated release note at ${file}`)
16+
})

Diff for: build/release.sh

+3
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,7 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
5858
else
5959
npm publish --tag $RELEASE_TAG
6060
fi
61+
62+
# generate release note
63+
VERSION=$VERSION npm run release:note
6164
fi

Diff for: package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"bench:ssr": "npm run build:ssr && node benchmarks/ssr/renderToString.js && node benchmarks/ssr/renderToStream.js",
3838
"release": "bash build/release.sh",
3939
"release:weex": "bash build/release-weex.sh",
40+
"release:note": "node build/gen-release-note.js",
4041
"postinstall": "bash build/install-hooks.sh",
4142
"commit": "git-cz"
4243
},
@@ -69,7 +70,7 @@
6970
"chromedriver": "^2.30.1",
7071
"codecov.io": "^0.1.6",
7172
"commitizen": "^2.9.6",
72-
"conventional-changelog-cli": "^1.3.1",
73+
"conventional-changelog": "^1.1.3",
7374
"cross-spawn": "^5.1.0",
7475
"cz-conventional-changelog": "^2.0.0",
7576
"de-indent": "^1.0.2",

Diff for: yarn.lock

+10-35
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ acorn@^5.0.0, acorn@^5.0.1:
5050
version "5.0.3"
5151
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d"
5252

53-
add-stream@^1.0.0:
54-
version "1.0.0"
55-
resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa"
56-
5753
adm-zip@~0.4.3:
5854
version "0.4.7"
5955
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1"
@@ -1269,7 +1265,7 @@ content-type@~1.0.2:
12691265
version "1.0.2"
12701266
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed"
12711267

1272-
conventional-changelog-angular@^1.3.4:
1268+
conventional-changelog-angular@^1.3.3:
12731269
version "1.3.4"
12741270
resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.3.4.tgz#7d7cdfbd358948312904d02229a61fd6075cf455"
12751271
dependencies:
@@ -1283,23 +1279,13 @@ conventional-changelog-atom@^0.1.0:
12831279
dependencies:
12841280
q "^1.4.1"
12851281

1286-
conventional-changelog-cli@^1.3.1:
1287-
version "1.3.1"
1288-
resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.1.tgz#1cd5a9dbae25ffb5ffe67afef1e136eaceefd2d5"
1289-
dependencies:
1290-
add-stream "^1.0.0"
1291-
conventional-changelog "^1.1.3"
1292-
lodash "^4.1.0"
1293-
meow "^3.7.0"
1294-
tempfile "^1.1.1"
1295-
12961282
conventional-changelog-codemirror@^0.1.0:
12971283
version "0.1.0"
12981284
resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.1.0.tgz#7577a591dbf9b538e7a150a7ee62f65a2872b334"
12991285
dependencies:
13001286
q "^1.4.1"
13011287

1302-
conventional-changelog-core@^1.9.0:
1288+
conventional-changelog-core@^1.8.0:
13031289
version "1.9.0"
13041290
resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.0.tgz#de5dfbc091847656508d4a389e35c9a1bc49e7f4"
13051291
dependencies:
@@ -1317,7 +1303,7 @@ conventional-changelog-core@^1.9.0:
13171303
read-pkg-up "^1.0.1"
13181304
through2 "^2.0.0"
13191305

1320-
conventional-changelog-ember@^0.2.6:
1306+
conventional-changelog-ember@^0.2.5:
13211307
version "0.2.6"
13221308
resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.6.tgz#8b7355419f5127493c4c562473ab2fc792f1c2b6"
13231309
dependencies:
@@ -1370,14 +1356,14 @@ conventional-changelog-writer@^1.1.0:
13701356
through2 "^2.0.0"
13711357

13721358
conventional-changelog@^1.1.3:
1373-
version "1.1.4"
1374-
resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.4.tgz#108bc750c2a317e200e2f9b413caaa1f8c7efa3b"
1359+
version "1.1.3"
1360+
resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.3.tgz#26283078ac38c094df2af1604b0a46bbc0165c4d"
13751361
dependencies:
1376-
conventional-changelog-angular "^1.3.4"
1362+
conventional-changelog-angular "^1.3.3"
13771363
conventional-changelog-atom "^0.1.0"
13781364
conventional-changelog-codemirror "^0.1.0"
1379-
conventional-changelog-core "^1.9.0"
1380-
conventional-changelog-ember "^0.2.6"
1365+
conventional-changelog-core "^1.8.0"
1366+
conventional-changelog-ember "^0.2.5"
13811367
conventional-changelog-eslint "^0.1.0"
13821368
conventional-changelog-express "^0.1.0"
13831369
conventional-changelog-jquery "^0.1.0"
@@ -3547,7 +3533,7 @@ [email protected]:
35473533
version "4.17.2"
35483534
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"
35493535

3550-
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:
3536+
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:
35513537
version "4.17.4"
35523538
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
35533539

@@ -3629,7 +3615,7 @@ memory-fs@^0.4.0, memory-fs@~0.4.1:
36293615
errno "^0.1.3"
36303616
readable-stream "^2.0.1"
36313617

3632-
meow@^3.3.0, meow@^3.7.0:
3618+
meow@^3.3.0:
36333619
version "3.7.0"
36343620
resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
36353621
dependencies:
@@ -5170,13 +5156,6 @@ tar@^2.2.1:
51705156
fstream "^1.0.2"
51715157
inherits "2"
51725158

5173-
tempfile@^1.1.1:
5174-
version "1.1.1"
5175-
resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2"
5176-
dependencies:
5177-
os-tmpdir "^1.0.0"
5178-
uuid "^2.0.1"
5179-
51805159
test-exclude@^4.1.1:
51815160
version "4.1.1"
51825161
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26"
@@ -5398,10 +5377,6 @@ [email protected]:
53985377
version "1.0.0"
53995378
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8"
54005379

5401-
uuid@^2.0.1:
5402-
version "2.0.3"
5403-
resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
5404-
54055380
uuid@^3.0.0:
54065381
version "3.0.1"
54075382
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1"

0 commit comments

Comments
 (0)