File tree 2 files changed +37
-3
lines changed
2 files changed +37
-3
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -119,6 +119,43 @@ export const publish_flags_config: FlagConfig = {
119
119
}
120
120
} ,
121
121
} ,
122
+ commit_changelog : {
123
+ name : 'Commit' ,
124
+ flag : 'commit_changelog' ,
125
+ flag_aliases : [ 'c' ] ,
126
+ flag_mispellings : [ 'cm' , 'comit' , 'changelog' ] ,
127
+ description : 'Whether to commit the changes to the changelogs' ,
128
+ type : Boolean ,
129
+ examples : [ ] ,
130
+ default_value : true ,
131
+ } ,
132
+ from : {
133
+ name : 'From Version' ,
134
+ flag : 'from' ,
135
+ flag_aliases : [ 'v' ] ,
136
+ flag_mispellings : [ 'ver' ] ,
137
+ description : 'The version from which to increment and build a strategy' ,
138
+ type : String ,
139
+ examples : [ ] ,
140
+ default_value : async ( options : Map < string , string | number | boolean | null > ) => {
141
+ return ( await getPublishedChannelInfo ( options ) ) . latest ;
142
+ } ,
143
+ validate : async ( value : unknown ) => {
144
+ if ( typeof value !== 'string' ) {
145
+ throw new Error ( `Expected a string but got ${ value } ` ) ;
146
+ }
147
+ if ( value . startsWith ( 'v' ) ) {
148
+ throw new Error ( `Version passed to promote should not start with 'v'` ) ;
149
+ }
150
+ if ( semver . valid ( value ) === null ) {
151
+ throw new Error ( `Version passed to promote is not a valid semver version` ) ;
152
+ }
153
+ const versionInfo = semver . parse ( value ) ;
154
+ if ( versionInfo ?. prerelease ?. length ) {
155
+ throw new Error ( `Version passed to promote cannot be prerelease version` ) ;
156
+ }
157
+ } ,
158
+ } ,
122
159
upstream : {
123
160
name : 'Update Upstream Branch' ,
124
161
flag : 'upstream' ,
You can’t perform that action at this time.
0 commit comments