@@ -47,27 +47,30 @@ export async function hasDiff() {
47
47
48
48
// TODO(yifany): remove console log output that is for debugging purpose
49
49
export async function pushReleaseTagsToGithub ( ) {
50
- console . log ( 'Pushing release tags to GitHub ...' )
50
+ console . log ( 'Pushing release tags to GitHub ...' ) ;
51
51
52
52
// Get tags pointing to HEAD
53
53
// When running the release script, these tags should be release tags created by changeset
54
- console . log ( `Running git tag --points-at HEAD at ${ process . cwd ( ) } ` )
54
+ console . log ( `Running git tag --points-at HEAD at ${ process . cwd ( ) } ` ) ;
55
55
const { stdout : rawTags } = await exec ( `git tag --points-at HEAD` ) ;
56
- console . log ( `stdout for git tag: ${ rawTags } ` )
56
+ console . log ( `stdout for git tag: ${ rawTags } ` ) ;
57
57
58
- const tags = rawTags . split ( / \r ? \n / ) ;
58
+ const tags = rawTags . split ( / \r ? \n / ) . join ( ' ' ) ;
59
59
60
- console . log ( `Running git rev-parse --abbrev-ref HEAD at ${ process . cwd ( ) } ` )
60
+ console . log ( `Running git rev-parse --abbrev-ref HEAD at ${ process . cwd ( ) } ` ) ;
61
61
let { stdout : currentBranch } = await exec ( `git rev-parse --abbrev-ref HEAD` ) ;
62
- console . log ( `stdout for git rev-parse: ${ currentBranch } ` )
62
+ console . log ( `stdout for git rev-parse: ${ currentBranch } ` ) ;
63
63
currentBranch = currentBranch . trim ( ) ;
64
64
65
- console . log ( `Running git push origin ${ currentBranch } ${ tags . join ( ' ' ) } --no-verify at ${ root } ` )
66
- const result = await exec ( `git push origin ${ currentBranch } ${ tags . join ( ' ' ) } --no-verify` , {
67
- cwd : root
68
- } ) ;
69
- console . log ( `stdout for git push: ${ result . stdout } ` )
70
- console . log ( `stderr for git push: ${ result . stderr } ` )
65
+ console . log (
66
+ `Running git push origin ${ currentBranch } ${ tags } --no-verify at ${ root } `
67
+ ) ;
68
+ const result = await exec (
69
+ `git push origin ${ currentBranch } ${ tags } --no-verify` ,
70
+ { cwd : root }
71
+ ) ;
72
+ console . log ( `stdout for git push: ${ result . stdout } ` ) ;
73
+ console . log ( `stderr for git push: ${ result . stderr } ` ) ;
71
74
72
- console . log ( `Pushing release tags to GitHub done.` )
75
+ console . log ( `Pushing release tags to GitHub done.` ) ;
73
76
}
0 commit comments