Skip to content
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

What to do if a commit is tagged more than once? #261

Closed
armanbilge opened this issue Apr 18, 2022 · 3 comments · Fixed by #285
Closed

What to do if a commit is tagged more than once? #261

armanbilge opened this issue Apr 18, 2022 · 3 comments · Fixed by #285

Comments

@armanbilge
Copy link
Member

In theory, it should be okay to tag the same commit as e.g. v0.1.0 and then again as v0.1.1 or v0.2.0 or even v1.0.0. Currently there's no special logic to handle this.

One option might be to use the highest version. However, if someone first tags v0.2.0 then retries as v0.1.1 it wouldn't work.

Another possibility is to try and introspect the exact tag that triggered the CI run, and use that. But this wouldn't work locally.

One more possibility is to use the newest tag, whatever that is.

@rossabaker
Copy link
Member

What is the "newest" tag? A lightweight tag has no date beyond the commit and author dates of the commit. A tag object does, but most people don't even know those exist.

@armanbilge
Copy link
Member Author

Oh, woops, I didn't really think about that. Then, seems the only reasonable choice is to use the highest-versioned tag, unless someone has another idea.

@armanbilge
Copy link
Member Author

This will be hindered by #14, which I have put off fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants