@@ -8,6 +8,7 @@ export type Platforms = 'android' | 'ios' | 'all'
88
99type Configs = {
1010 type ?: SemVer
11+ version ?: string
1112 skipSemVerFor : Platforms [ ]
1213 skipCodeFor : Platforms [ ]
1314 root : string
@@ -30,8 +31,8 @@ const matchFirst = curry((reg: RegExp, value: string) => {
3031 return first
3132} )
3233
33- const incrementSemVer = ( version : string , type : SemVer | undefined ) => {
34- const [ major , minor , patch ] = parseSemVer ( version )
34+ const incrementSemVer = ( current : string , type : SemVer | undefined ) => {
35+ const [ major , minor , patch ] = parseSemVer ( current )
3536
3637 if ( type === 'major' ) {
3738 return [ major + 1 , 0 , 0 ] . join ( '.' )
@@ -272,9 +273,9 @@ export class ProjectFilesManager {
272273 * This executes changes but don't actually write anything to fs
273274 */
274275 dryRun ( ) {
275- const { type, skipSemVerFor, skipCodeFor } = this . configs
276+ const { type, version , skipSemVerFor, skipCodeFor } = this . configs
276277 const current = this . packageJSON . getVersion ( )
277- const next = incrementSemVer ( current , type ?? 'minor' )
278+ const next = version ?? incrementSemVer ( current , type ?? 'minor' )
278279
279280 if ( ! skipCodeFor . includes ( 'all' ) ) {
280281 this . bumpCodes ( )
0 commit comments