It's rare but possible to create multiple releases of the exact same revision of code.
One way to do it would be to first sort the versions (semver ordering for semver, how about the custom versions though - time based sort perhaps?) and then:
a) print only the latest one, ignore the rest
b) write down full history of the first release point, and a simple entry (e.g. "Version released") for each following release
c) list full changelog for each of the releases - probably the worst option and the most diffucult to implement as well.
It's rare but possible to create multiple releases of the exact same revision of code.
One way to do it would be to first sort the versions (semver ordering for semver, how about the custom versions though - time based sort perhaps?) and then:
a) print only the latest one, ignore the rest b) write down full history of the first release point, and a simple entry (e.g. "Version released") for each following release c) list full changelog for each of the releases - probably the worst option and the most diffucult to implement as well.
https://github.com/nokia/git-changelog-generator/blob/b08973433ab6971301fdf713df1a578ea75a459f/gcg/entrypoint.py#L416