-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Not detecting existing release #1121
Comments
Update: I am having the same issue with normal release branches. Here the history:
Here is the log:
and the release config:
Could the problem come from the commit analyzer plugin ? I don't have it installed locally, I use Any idea ? For information, downgrading to v15 fixes the problem. |
I have the same issue. In a strange way it seems to work correctly when I test in a local container but fails in Gitlab CI. In a local docker container:
In Gitlab CI:
|
It's difficult to figure out what's going on with the info provided, but here is a few that might help:
I'm not really sure in which state is your repo right now, nor how can I help. |
In case it helps @charliebravodev, I had a similar issue and I discovered that the released git tag was pointing at an orphan commit, probably due to a rebase. My solutionFind the git commit that should be the one that the tag
In my scenario was
then force push the tags to the remote repo too running 👇
ProposalInclude a precondition check in semantic-release or the check plugin like Not that pseudo code 😅const tags = getTagsCommitIDs()
const DEFAULT_RELEASE_BRANCH = 'master'
const checkContains = (commitId, branch = DEFAULT_RELEASE_BRANCH) =>
exec(`git branch --contains ${commitId}`)
const isEveryTagContainedInBranch = tags.every(checkContains) Will this make sense @pvdlg? If so how will you approach it? |
@alvaropinot could you create a follow up issue? A comment on a closed issue might easily be overseen, and issue will work better as a reminder. I very much like your suggestion :) |
Current behavior
Because of an npm misconfiguration, my pre-release branch failed in the middle of a release.
@semantic-release/git
tagged the version correctly and created a commitchore(release)...
but@semantic-release/npm
failed. I then pushed a fix to the pre-release branch and the commit analyser doesn't seem to find an existing release, so it tries to releasev1.0.0-alpha.1
, but then the git plugin fails because the tag already exists.Expected behavior
I'm not sure how the commit analyser determines whether there is an existing pre-release, but I would guess that it checks for the existence of a version tag. In this case, it should detect that a pre-release was already performed, and bump the version to
v1.0.0-alpha.2
.As you'll see in the logs, I tried pushing a fix, a feature, a breaking change, nothing succeeded.
I would expect any commit to the pre-release branch to trigger a new release.
Environment
The text was updated successfully, but these errors were encountered: