Skip to content

Commit 95f98f4

Browse files
authored
Merge cfccf7a into 1d3a34d
2 parents 1d3a34d + cfccf7a commit 95f98f4

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

scripts/release/utils/git.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,32 @@ export async function hasDiff() {
4545
return !!diff;
4646
}
4747

48+
// TODO(yifany): remove console log output that is for debugging purpose
4849
export async function pushReleaseTagsToGithub() {
50+
console.log('Pushing release tags to GitHub ...');
51+
4952
// Get tags pointing to HEAD
5053
// 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()}`);
5155
const { stdout: rawTags } = await exec(`git tag --points-at HEAD`);
56+
console.log(`stdout for git tag: ${rawTags}`);
5257

53-
const tags = rawTags.split(/\r?\n/);
58+
const tags = rawTags.split(/\r?\n/).join(' ');
5459

60+
console.log(`Running git rev-parse --abbrev-ref HEAD at ${process.cwd()}`);
5561
let { stdout: currentBranch } = await exec(`git rev-parse --abbrev-ref HEAD`);
62+
console.log(`stdout for git rev-parse: ${currentBranch}`);
5663
currentBranch = currentBranch.trim();
5764

58-
await exec(`git push origin ${currentBranch} ${tags.join(' ')} --no-verify`, {
59-
cwd: root
60-
});
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}`);
74+
75+
console.log(`Pushing release tags to GitHub done.`);
6176
}

0 commit comments

Comments
 (0)