File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {logger as defaultLogger, Logger} from '../util/logger';
1818
1919const VERSION_REGEX =
2020 / (?< major > \d + ) \. (?< minor > \d + ) \. (?< patch > \d + ) ( - (?< preRelease > [ \w . ] + ) ) ? ( \+ (?< build > [ - \w . ] + ) ) ? / ;
21+ const MAJOR_VERSION_REGEX = / \d + \b /
2122const SINGLE_VERSION_REGEX = / \b \d + \b / ;
2223const INLINE_UPDATE_REGEX =
2324 / x - r e l e a s e - p l e a s e - (?< scope > m a j o r | m i n o r | p a t c h | v e r s i o n ) / ;
@@ -91,7 +92,7 @@ export class Generic extends DefaultUpdater {
9192 function replaceVersion ( line : string , scope : BlockScope , version : Version ) {
9293 switch ( scope ) {
9394 case 'major' :
94- newLines . push ( line . replace ( SINGLE_VERSION_REGEX , `${ version . major } ` ) ) ;
95+ newLines . push ( line . replace ( MAJOR_VERSION_REGEX , `${ version . major } ` ) ) ;
9596 return ;
9697 case 'minor' :
9798 newLines . push ( line . replace ( SINGLE_VERSION_REGEX , `${ version . minor } ` ) ) ;
You can’t perform that action at this time.
0 commit comments