Enforce Semantic Versioning (SemVer)
Problem
Versioning is currently not standardized and lacks proper control.
There is no enforcement of Semantic Versioning rules (Major.Minor.Patch), which leads to:
- Inconsistent version formats across releases
- Invalid or non-semantic versions (e.g.,
v1.0, version-2, 1.2.3-beta)
- Difficulty in tracking changes and compatibility
- Increased risk of human error during manual versioning
Proposed Solution
Implement strict Semantic Versioning control with the following improvements:
-
Enforce SemVer Pattern
All versions must follow the standard format:
vMAJOR.MINOR.PATCH
Example: v1.0.0, v2.3.1, v10.5.0
-
Add Validation Step
Add a validation check in the release pipeline:
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "❌ Error: Version must follow Semantic Versioning format (vMAJOR.MINOR.PATCH)"
exit 1
fi
Enforce Semantic Versioning (SemVer)
Problem
Versioning is currently not standardized and lacks proper control.
There is no enforcement of Semantic Versioning rules (Major.Minor.Patch), which leads to:
v1.0,version-2,1.2.3-beta)Proposed Solution
Implement strict Semantic Versioning control with the following improvements:
Enforce SemVer Pattern
All versions must follow the standard format:
vMAJOR.MINOR.PATCHExample:
v1.0.0,v2.3.1,v10.5.0Add Validation Step
Add a validation check in the release pipeline: