-
Type: Task
-
Status: To Do (View Workflow)
-
Priority: Medium
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: ci-system
-
Labels:
-
Story Points:0
The community has reported an interest in having merge requests rejected when the VERSION file has not been updated.
General version checking logic:
- Use a regex for general version string validation.
- Split string on dot to obtain fields (list = {major, minor, ...}
- Sub-split fields
- hyphen to separate modifiers
- string/int boundries: dev1 => ['dev', '1']
- Individual fields can be examined to compare -dev1, -dev2, -dev3, etc.
- Loop over field data and compare.
Basic error detection:
- Merge request into the master branch:
-
- Version string cannot contain "-dev"
- Version string must increment a single field +1:
- master contains v1.1.4
- VERSION file can contain:
- 1.1.5
- 1.2.0
- 2.0[.0]
- The community also requested requiring a version string bump for each code change on (branch != master):
-
- 1.1-dev1 => 1.1-dev2 => 1.1-dev3
- Fail when VERSION string:
- version_string != 1 + last_version
- Suggestions made based on development workflow, checking non-master merges could be problematic::
- Behavior would require modifying file VERSION with every submit.
- We may be able to validate major.minor strings but modifiers like -devXX would be problematic:
-
-
- Potential problem - requiring a version bump for – devXX branches would serialize merging and often force an extraneous VERSION file edit to accommodate the latest -dev modifier value.
-