Simplify tags handling #15
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I tried to make the tags handling more robust. The original implementation only had support for
v0.0.0-<timestamp>-<hash>type of pseudo versions. That didn't work becausev0.0.0is usable only for v0 and v1 Go modules and we also have v2+ Go modules.The idea was that we properly cover all possible version and pseudo version string variants. That said, this was supposed to enable publishing-bot to update dependencies managed by publishing-bot in
go.modfiles for staged repositories to real tags instead of pseudo versions. For example, ifclient-gois depending onapimachinery, and both are staged repositories, publishing-bot would updateapimachineryto the real tag (e.g. v0.29.0) instead of pseudo version string (v2.0.0-<timestamp>-<hash>) when the v0.29.0 tag is created.Unfortunately, after spending too much time on it, it didn't work out. So we are back to the original implementation, just with a fix to make it work with non-v0/v1 Go modules. That said,
go.modfiles will always have pseudo version strings for dependencies to our staging repositories. It might be possible to make it work, but that needs a bit more of changes, and it's probably not worth it./assign @xrstf