File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,24 @@ if (rcType && !allowedRcBumps.includes(rcType)) {
1919}
2020
2121if ( bumpType !== 'fix-changelog-order' ) {
22- changeLog ( bumpVersion ( ) ) ;
22+ bumpAndTagVersion ( ) ;
2323} else {
2424 fixChangelogOrder ( ) ;
2525}
2626
27+ function bumpAndTagVersion ( ) {
28+ const [ initialVersion , bumpedVersion ] = bumpVersion ( ) ;
29+ changeLog ( [ initialVersion , bumpedVersion ] ) ;
30+
31+ execSync ( 'git reset HEAD -- .' ) ;
32+
33+ execSync ( 'git add package.json package-lock.json CHANGELOG.md projects/angular/package.json' ) ;
34+
35+ execSync ( `git commit -m "chore: bump version to v${ bumpedVersion } "` ) ;
36+
37+ execSync ( `git tag v${ bumpedVersion } ` ) ;
38+ }
39+
2740
2841function bumpVersion ( ) {
2942 const content = fs . readFileSync ( './package.json' , 'utf-8' ) ;
@@ -63,8 +76,6 @@ function bumpVersion() {
6376
6477 fs . writeFileSync ( './package-lock.json' , updatedPackageLock ) ;
6578
66- execSync ( `git tag v${ bumpedVersion } ` ) ;
67-
6879 return [ initialVersion , bumpedVersion ] ;
6980}
7081
You can’t perform that action at this time.
0 commit comments