File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,13 @@ import packageJson from '../package.json' assert { type: 'json' }
13
13
14
14
const version = getVersion ( packageJson )
15
15
const branch = exec ( 'git branch --show-current' , { stdio : 'pipe' } ) [ 0 ] . trim ( )
16
+ console . log ( 'Current branch:' , branch )
16
17
17
18
await setVersions ( { version } )
18
19
19
20
if ( checkStatus ( ) === 'clear' ) process . exit ( 0 )
20
21
21
- commitAndPush ( { version } )
22
+ commitAndPush ( { version, branch } )
22
23
publishToNPM ( {
23
24
tag :
24
25
branch === PRODUCTION_BRANCH
@@ -78,14 +79,14 @@ function getVersion(packageJson) {
78
79
}
79
80
80
81
/**
81
- * @param {{ version: string } } params
82
+ * @param {{ version: string, branch: string } } params
82
83
*/
83
- function commitAndPush ( { version } ) {
84
+ function commitAndPush ( { version, branch } ) {
84
85
exec ( `
85
86
git config user.name 'Piotr Monwid-Olechnowicz'
86
87
git config user.email '[email protected] '
87
88
git commit -am "Bump versions to: ${ version } [skip ci]"
88
- git push
89
+ git push origin HEAD: ${ branch }
89
90
` )
90
91
}
91
92
You can’t perform that action at this time.
0 commit comments