fix: Missing tag (#5808)
This commit is contained in:
parent
10b0560170
commit
c92bdd5b48
@ -97,6 +97,11 @@ async function run() {
|
|||||||
// This combines the version.json commit and package version updates into one commit
|
// This combines the version.json commit and package version updates into one commit
|
||||||
await execa('git', ['commit', '--amend', '--no-edit']);
|
await execa('git', ['commit', '--amend', '--no-edit']);
|
||||||
|
|
||||||
|
// Lerna created a local tag (e.g. v3.13.0-beta.7) pointing to the pre-amend commit.
|
||||||
|
// Move the tag to the amended commit so the release tag matches what we push.
|
||||||
|
const tagName = `v${nextVersion}`;
|
||||||
|
await execa('git', ['tag', '-f', tagName]);
|
||||||
|
|
||||||
console.log('Pushing changes...');
|
console.log('Pushing changes...');
|
||||||
|
|
||||||
// Note: Force push is not necessary here because:
|
// Note: Force push is not necessary here because:
|
||||||
@ -106,6 +111,9 @@ async function run() {
|
|||||||
// A regular push is sufficient since we're pushing a commit that doesn't exist on the remote yet
|
// A regular push is sufficient since we're pushing a commit that doesn't exist on the remote yet
|
||||||
await execa('git', ['push', 'origin', branchName]);
|
await execa('git', ['push', 'origin', branchName]);
|
||||||
|
|
||||||
|
console.log('Pushing tag...');
|
||||||
|
await execa('git', ['push', 'origin', tagName]);
|
||||||
|
|
||||||
console.log('Version set using lerna');
|
console.log('Version set using lerna');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user