Modify Charts version detection to support backport releases
Determine the next helm chart using existing tags in the repo. The logic is:
- Check if tags already exist matching the pattern
<MAJOR>.<MINOR>.#
. If so, we are releasing a new patch version. Get the latest one, and bump patch component. - Else, check if tags already exist matching the pattern
<MAJOR>.#.#
. If so, we are releasing a new minor version. Get the latest one, and bump minor component (and set patch to 0) - Else, we are releasing a new major version. Get the latest one, and bump major component (and set minor and patch to 0)
Closes: https://gitlab.com/gitlab-org/distribution/team-tasks/issues/213
Edited by Balasankar 'Balu' C