Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbda0f51

Browse files
committed
chore: add changelog generation
1 parent4188da2 commitbda0f51

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

‎.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ samples/app/nativescript-vue.js
99
samples/app/nativescript-vue.js.map
1010
dist/
1111
packages/nativescript-vue-template-compiler/index.js
12-
!docs/dist/
12+
!docs/dist/
13+
RELEASE_NOTES*.md

‎build/gen-release-notes.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
constversion=process.argv[2]||process.env.VERSION
2+
constcc=require('conventional-changelog')
3+
constfile=`./RELEASE_NOTES${version ?`_${version}` :``}.md`
4+
constfileStream=require('fs').createWriteStream(file)
5+
6+
cc({
7+
preset:'angular',
8+
pkg:{
9+
transform(pkg){
10+
if(version){
11+
pkg.version=`v${version}`
12+
}
13+
returnpkg
14+
}
15+
}
16+
}).pipe(fileStream).on('close',()=>{
17+
console.log(`Generated release notes in${file}`)
18+
})

‎build/releaser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ inquirer
4646
git add -A
4747
git add -f dist/index.js dist/index.js.map packages/nativescript-vue-template-compiler/index.js
4848
git commit -m "${buildMessage}"
49+
npm run release:notes
4950
npm version${version} -m "${releaseMessage}"
5051
echo "Pushing to git"
5152
git push origin refs/tags/v${version}

‎package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"build:docs":"cd docs && npm run build",
1313
"prettier":"prettier --no-semi --single-quote --write\"{{platform,__test__}/**/*.js,samples/app/*.js}\"",
1414
"release":"node build/releaser.js",
15+
"release:notes":"node build/gen-release-notes.js",
1516
"commit":"git-cz"
1617
},
1718
"repository": {
@@ -57,6 +58,7 @@
5758
"babel-preset-env":"^1.6.1",
5859
"chalk":"^2.3.0",
5960
"commitizen":"^2.9.6",
61+
"conventional-changelog":"^1.1.7",
6062
"cz-conventional-changelog":"^2.1.0",
6163
"husky":"^0.15.0-beta.16",
6264
"inquirer":"^3.3.0",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp