Skip to content

parse tags correctly in release script #3385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions scripts/release/utils/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ export async function pushReleaseTagsToGithub() {
// When running the release script, these tags should be release tags created by changeset
const { stdout: rawTags } = await exec(`git tag --points-at HEAD`);

const tags = rawTags.split('\r\n');
const tags = rawTags.split(/\r?\n/);

let { stdout: currentBranch } = await exec(`git rev-parse --abbrev-ref HEAD`);
currentBranch = currentBranch.trim();

await exec(`git push origin ${tags.join(' ')} --no-verify`, { cwd: root });
await exec(`git push origin ${currentBranch} ${tags.join(' ')} --no-verify`, {
cwd: root
});
}