Skip to content

Commit 3856b4a

Browse files
committed
feat: support --skip-changelog
1 parent 88eab2d commit 3856b4a

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ npx vr publish
6969
| ---------------------- | ------------------- |
7070
| -r --remote \<remote\> | Specify remote name |
7171
| -s --skip-npm-publish | Skip npm publish |
72+
| -sc --skip-changelog | Skip generate changelog |
7273
| -sgt --skip-git-tag | Skip git tag |
7374

7475
#### changelog
@@ -129,6 +130,7 @@ function updateVersion(version: string): void
129130
interface ReleaseCommandOptions {
130131
remote?: string
131132
skipNpmPublish?: boolean
133+
skipChangelog?: boolean
132134
skipGitTag?: boolean
133135
task?(): Promise<void>
134136
}

README.zh-CN.md

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ npx vr publish
6969
| ---------------------- | ---------------- |
7070
| -r --remote \<remote\> | 指定远程仓库名称 |
7171
| -s --skip-npm-publish | 跳过 npm 发布 |
72+
| -sc --skip-changelog | 跳过生成变更日志 |
7273
| -sgt --skip-git-tag | 跳过 git tag |
7374

7475
#### changelog
@@ -129,6 +130,7 @@ function updateVersion(version: string): void
129130
interface ReleaseCommandOptions {
130131
remote?: string
131132
skipNpmPublish?: boolean
133+
skipChangelog?: boolean
132134
skipGitTag?: boolean
133135
task?(): Promise<void>
134136
}

bin/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ program
88
.command('release')
99
.option('-r --remote <remote>', 'Remote name')
1010
.option('-s --skip-npm-publish', 'Skip npm publish')
11+
.option('-sc --skip-changelog', 'Skip generate changelog')
1112
.option('-sgt --skip-git-tag', 'Skip git tag')
1213
.description('Release all packages and generate changelogs')
1314
.action(async (options) => release(options))

src/release.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ async function getReleaseType(): Promise<ReleaseType> {
157157
export interface ReleaseCommandOptions {
158158
remote?: string
159159
skipNpmPublish?: boolean
160+
skipChangelog?: boolean
160161
skipGitTag?: boolean
161162
task?(): Promise<void>
162163
}
@@ -203,7 +204,9 @@ export async function release(options: ReleaseCommandOptions) {
203204
}
204205

205206
if (!isPreRelease) {
206-
await changelog()
207+
if (!options.skipChangelog) {
208+
await changelog()
209+
}
207210
await pushGit(expectVersion, options.remote, options.skipGitTag)
208211
}
209212

0 commit comments

Comments
 (0)