Signed-off-by: Adam Miller maxamillion@fedoraproject.org
Previously, we have been strict about the format of the release values koji will auto increment. This opens that up quite a bit. Now it also accepts N.$anything.
That's fine, but if we're going to open it up this wide, we may need to be more careful. In particular, this code will increment '44.1.el6' to '45.1.el6'. This seems surprising, but maybe that is reasonable. OTOH, I wonder if we should restrict to only one dot for now, until we figure out how how we want to handle more general cases.
I have added a unit test for get_next_release on top of your changes here: https://github.com/mikem23/koji-playground/commits/get_next_release
@maxamillion Any comments, or could we pull Mike's variant with test?
Note: my variant is not ready for pull either. The test currently fails, actually.
I think the shortest path is to be a little stricter about what auto increment will handle for now, and have a larger conversation about the more general case.
By stricter, I mean only handle releases like N (as we currently do) and N.$dist (i.e. only one dot). It's pretty clear that N.$dist should increment to N+1.$dist. It's a little less clear to me what we want to do with releases like:
I have no preference, which ever works best. :)
I'm merging this with a small adjustment as mentioned above.
Commit 400e70a3 fixes this pull-request
Pull-Request has been merged by mikem@redhat.com
Signed-off-by: Adam Miller maxamillion@fedoraproject.org