go-utils
go-utils copied to clipboard
Remove duplicated and older dependency bumps on generation
Changes
Added code to only generate the latest dependency bumps on release.
When following semantic versioning v[MAJOR][.MINOR][.PATCH]
, we only get the latest bump in the list of dependency bumps. When not following semantic versioning, we display all bumps done within the release.
Context
We've previously had instance on release, where we see multiple dependency bumps for the same dependency, for example:
** DEPENDENCY BUMPS **
- solo-io/gloo has been upgraded to v1.15.0-beta7
- solo-io/gloo has been upgraded to v1.15.0-beta8
- solo-io/gloo has been upgraded to v1.15.0-beta9
In order to mitigate this, developers have to manually remove older reference bumps within the same release version - which is easy to forget.
Other possible path(s) forward
- In the comment of issue #510
TODO / NOTES
- What about when dependencies get downgraded for whatever reason?
- Ex.: Code merges Monday and bumps
gloo
to1.15.0
. On Tuesday we decide we want to downgrade to1.14.0-rc5
. - Currently, we will only show the bump to
1.15.0
on the release changelog, since it's the greater of both. BUT the downgrade was the latest and most important...
- Ex.: Code merges Monday and bumps
- How can we handle the case where we have a
patch
postfix on a tag, and then bump torc
?-
semver.Compare
just compares the postfixes as strings, sopatch
is a "newer" release than anrc
.
-
These are probably not super likely scenarios, but still technically possible.