I would like to ensure that code merged via merge request in a GitLab from the feature branch to our develop branch has always a new unique version (gitflow strategy).
Version suppose to be used for:
- Docker image tag
- Package/code/library bundle
- Displayed to the user and added to the release notes.
I am having a few strategies in mind
- Add checklist template to the merge request so reviewer has to mark checbox that version was increased.
- Additionally to the previous manual step I would like to have CI/CD step for the validation: Ex: need to check previous version of commit with a new one to ensure that pending merge request has greater version than previous. Any clues whether it's possible to determine?
- CI/CD on a develop branch should automatically increase version of the package and commit. Not sure whether this possible and whether ad-hoc commit will no trigger CI/CD again. (can a problem to handle hotfixes)
I would appreciate any suggestions and your ideas. BR