-
Notifications
You must be signed in to change notification settings - Fork 1.8k
docs(Troubleshooting): release not found in prereleases branch (e.g. beta) after rebase on master)
#1444
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
Conversation
docs/support/troubleshooting.md
Outdated
| $ git push origin :refs/tags/<tag name> | ||
| ``` | ||
|
|
||
| ## release not found in prereleases branch (e.g. `beta`) after rebase on `master` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not specifically related to prereleases branches. This principle is true for any branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semantic-release is using git notes for master, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a new tag is created yes. But if there is a tag without a note then we consider the version was published on the channel associated with master.
So if your version has been published on the channel associated with master (by default not specified so each plugin would use it's specific default such as latest for npm) and next then you will have a note with {"channels:[null,"next"]"}.
docs/support/troubleshooting.md
Outdated
|
|
||
| 1. Delete the tag(s) for the release(s) that have been lost from the git history. You can delete each tag from remote using `git push origin :[TAG NAME]`, e.g. `git push origin :v2.0.0-beta.1`. You can delete tags locally using `git tag -d [TAG NAME]`, e.g. `git tag -d v2.0.0-beta.1`. | ||
| 2. Re-create the tags locally: `git tag [TAG NAME] [COMMIT HASH]`, where `[COMMIT HASH]` is the new commit that created the release for the lost tag. E.g. `git tag v2.0.0-beta.1 abcdef0` | ||
| 3. Re-create the git notes for each release tag, e.g. `git notes --ref semantic-release add -f -m '{"channels":["beta"]}' v3.0.0-beta.1` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we should specify that the channel prop should contain the list of channel on which that version was added. If it's the default channel (the first release channel, usually master) then it should be set as null.
docs/support/troubleshooting.md
Outdated
|
|
||
| 1. Delete the tag(s) for the release(s) that have been lost from the git history. You can delete each tag from remote using `git push origin :[TAG NAME]`, e.g. `git push origin :v2.0.0-beta.1`. You can delete tags locally using `git tag -d [TAG NAME]`, e.g. `git tag -d v2.0.0-beta.1`. | ||
| 2. Re-create the tags locally: `git tag [TAG NAME] [COMMIT HASH]`, where `[COMMIT HASH]` is the new commit that created the release for the lost tag. E.g. `git tag v2.0.0-beta.1 abcdef0` | ||
| 3. Re-create the git notes for each release tag, e.g. `git notes --ref semantic-release add -f -m '{"channels":["beta"]}' v3.0.0-beta.1`. Add all channels where the version was added. If it's only the default channel (usually `master`), then set it to an empty array: `'{"channels":[]}'` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's only the default channel (usually
master), then set it to an empty array:'{"channels":[]}'
That's incorrect. And empty array would creates issues. It should be:
If this version was published only in the default channel (the first release branch, usually
master), then the Git note is unecessary.
If this version was published both on the default channel and another one, then a Git note is necessary. Thechannelsproperty must contains all the channel on which the version was published andnullas to be used to represent the default channel, e.g.{"channels":[null,"beta"]}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I misunderstood your previous feedback, sorry, will fix
|
🎉 This PR is included in version 17.0.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
fixes #1442