File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Config , Context , OverrideConfig , UserConfig } from "./types" ;
2+ import { progress } from "./utils/progress" ;
23import { dateFormat } from "./utils/string" ;
34import { loadConfig as c12 } from "c12" ;
45import fs from "fs-extra" ;
@@ -137,12 +138,14 @@ const defaultConfig = {
137138 release : {
138139 bumpp : {
139140 release : "prompt" ,
141+ confirm : true ,
140142 preid : "beta" ,
141143 // execute: "npm run build",
142144 all : false ,
143- commit : "Release v%s" ,
145+ commit : "chore(publish): release v%s" ,
144146 tag : "v%s" ,
145147 push : true ,
148+ progress : progress ,
146149 } ,
147150 } ,
148151 logLevel : "info" ,
Original file line number Diff line number Diff line change 1+ import { ProgressEvent , VersionBumpProgress } from "bumpp" ;
2+ import consola from "consola" ;
3+
4+ /**
5+ * bumpp 显示进度的回调
6+ *
7+ * @see https://github.com/antfu/bumpp/blob/main/src/cli/index.ts
8+ */
9+ export function progress ( {
10+ event,
11+ script,
12+ updatedFiles,
13+ skippedFiles,
14+ newVersion,
15+ } : VersionBumpProgress ) : void {
16+ switch ( event ) {
17+ case ProgressEvent . FileUpdated :
18+ consola . success ( `Updated ${ updatedFiles . pop ( ) } to ${ newVersion } ` ) ;
19+ break ;
20+
21+ case ProgressEvent . FileSkipped :
22+ consola . info ( `${ skippedFiles . pop ( ) } did not need to be updated` ) ;
23+ break ;
24+
25+ case ProgressEvent . GitCommit :
26+ consola . success ( "Git commit" ) ;
27+ break ;
28+
29+ case ProgressEvent . GitTag :
30+ consola . success ( "Git tag" ) ;
31+ break ;
32+
33+ case ProgressEvent . GitPush :
34+ consola . success ( "Git push" ) ;
35+ break ;
36+
37+ case ProgressEvent . NpmScript :
38+ consola . success ( `Npm run ${ script } ` ) ;
39+ break ;
40+ }
41+ }
You can’t perform that action at this time.
0 commit comments