semantic-release / gitlab

:fox_face: semantic-release plugin to publish a GitLab release
MIT License
284 stars 80 forks source link

Duplicate Tags - How to skip to a new version #760

Open stringy05 opened 3 months ago

stringy05 commented 3 months ago

Hello,

We are using gitlab and semantic-release and semantic-release/gitlab plugin to do version tagging / creating releases.

Our pipeline was broken by someone manually adding tags (without the associated release in gitlab), so we are now in a situation where our pipeline using semantic-release is trying to create version tag 1.1.0-develop.25 but we are up to 1.1.0-develop.36

We have been manually doing the pipeline job since v25 (the devs were unaware of semantic-release, let alone how it worked and needed to get builds out).

We created a release manually in gitlab on the v25 tag, however the semantic-release script is still trying to create v25.

Is there a way to manually do the releases in gitlab to convince semantic-release to use the latest version?

I have seen semantic-release uses git notes to store current version info, I guess that the gitlab plugin uses the gitlanb releases instead to maintain the version info? There are no results for git notes list on our repo.

Thanks

gravypower commented 2 months ago

+1 this has happened for me also

fgreinacher commented 2 months ago

Can one you please provide a minimal project on GitLab.com that shows this behavior? That would really help us understand the situation better. 🙇

stringy05 commented 2 months ago

Not without some significant effort, it's an internal repository.

I guess what would be really useful is to know where sematic-release sources the current version number from, is it purely the releases in gitlab, or is there some extra place it is looking as well?

travi commented 2 months ago

semantic-release uses tags and git notes to manage versions and what has been released in which channel. from your mentioned versions, it looks like you are using gitflow with out prerelease workflow (which, btw, is not officially supported), so you will need to repair both to recover from the situation you are in. you can find details about how to do so in our docs at:

stringy05 commented 2 months ago

does it use git notes when I'm using the gitlab plugin? If I run git notes on the repo in question there is no output eg:

$ git notes
$ echo $?
0
$ git notes list
$
travi commented 1 month ago

git notes are used by the core of semantic-release to track which distribution channels a version has been released to. if you are only releasing to your default channel from your default branch, notes are not important. they are much more important for pre-releases and maintenance release workflows