Skip to content
This repository was archived by the owner on Jan 4, 2025. It is now read-only.

Commit f84d1d0

Browse files
committed
Improved rules
- renamed "Optional Parameters" to "Suffix" - added rules for suffixes - added more specific rules for stage additions - rearranged rules - reaaranged help texts for versioning parts
1 parent 76a1b3e commit f84d1d0

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

README.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# **code null versioning 1.0.0.2 (CNV)**
1+
# **code null versioning 1.1.0.0 (CNV)**
22

33
The CNV provides a rather simple schema. It is based on [Semantic Versioning](https://semver.org/), but with a rule set, that is applicable to a broader range of projects.
44

55
A version string has the following structure and only consists of numbers. The parts that are in brackets are optional. Every bracket pair can be combined with every other or be left out entirely. But what is inside must always be there. When using these, the meaning must be specified in the README. For that the following destructuring can be used.
66

7-
**Structure:** (prefix)w.x.y.z(dot)(dash)(\*)(-S)
7+
**Structure:** (prefix)w.x.y.z(dot)(dash)(suffix)(-S)
88

99
**Destructured:**
1010

@@ -15,28 +15,31 @@ A version string has the following structure and only consists of numbers. The p
1515
- z: Use for small styling changes, typo fixes or minor code changes, that do not impact the functionality
1616
- dot: optional dot for separating the next part
1717
- dash: optional dash for separating the next part
18-
- \*: can be a letter or number, to indicate any further changes
18+
- suffix: can be a letter or number, to indicate any further changes
1919
- \-S: The current stage of the project (alpha, pre-alpha, etc.)
2020

2121
## **Rules**
2222

23-
The following rules apply when changing the version number. While some points might appear logical, they are still explicitly named.
23+
The following rules need to be followed to be in line with CNV. While some points might appear logical, they are still explicitly named.
2424

25-
1. A version number must always go up
25+
1. A project always starts at version 0.1.0.0
26+
2. A version number must always go up
2627
- The same applies to letters if used
27-
2. Increments are only allow in single steps
28+
3. Increments are only allowed in single steps
2829
- E.g.: No skipping from 1.1.2.0 to 1.1.4.0
29-
3. A project always starts at version 0.1.0.0
3030
4. When increasing a part of a version number, all lower parts must be reset to 0
31-
- An increase in the stage must reset the version to 0.1.0.0
32-
- If it is the first complete release the first version starts at 1.0.0.0
33-
5. The stage addition must not be added or removed in the middle of versioning and be either present from the beginning or not at all
34-
- Exception: If a stable production ready version is released, the stage addition may be dropped
35-
6. A release may contain multiple smaller changes
36-
- E.g.: a major release may contain bug fixes as well
37-
7. A prefix must not change whatsoever and must be present from the very beginning or not at all
38-
8. All versions with major version 1 or higher are considered production ready, if they have dedicated releases
31+
5. All versions with major version 1 or higher are considered production ready, if they have dedicated releases
3932
- Exception: If the stage is specified in the version string
33+
6. The stage addition must not be added or removed in the middle of versioning and be either present from the beginning or not at all
34+
- Exception: If a stable production ready version is released, the stage addition may be dropped, but not added back later
35+
7. An increase in the stage must reset the version to 0.1.0.0
36+
- Exception: If it is a production release with a stage addition, the version must be set to x.0.0.0, where x is the latest major version number
37+
- Exception: If it is the first production ready release it still starts at 1.0.0.0
38+
8. A release may contain multiple smaller changes, that would fall into a lower category
39+
- E.g.: a major release may contain bug fixes as well
40+
9. A prefix must not change whatsoever and must be present from the very beginning or not at all
41+
10. A suffix must be present from the very beginning or not at all
42+
11. If a suffix is used, it's meaning and incrementing rules must be defined in the README or another suitable place
4043

4144
## Use cases
4245

@@ -118,6 +121,10 @@ The following cases should always lead to a new style version:
118121
- Existing texts, strings, buttons etc. were formatted differently
119122
- Details on a design changed
120123

124+
### **Suffix**
125+
126+
These optional parameters can be anything that makes sense for that project. For further differentiation numbers or letters can be added, separated by a dash or a dot. They still need to follow the basic rule of always increasing and resetting when a higher part is increased. However in which cases these change, can be freely defined. Those rules must be documented in the README or another suitable place.
127+
121128
### **Project Stage**
122129

123130
The project stage addition changes whenever the project changes from one stage to another. Every change in that part results in a reset of all previous parts. If the project is still in active development (pre-alpha, alpha, beta, etc.) this addition must be kept, until the first stable production ready release.
@@ -126,10 +133,6 @@ There are no specific rules, for when to move from one stage to another. It is r
126133

127134
For non-coding projects this part might not be relevant, but if used it must follow the same rules,
128135

129-
### **Optional Parameters**
130-
131-
These optional parameters can be anything that makes sense for that project. For further differentiation numbers or letters can be added, separated by a dash or a dot. They still need to follow the basic rule of always increasing and resetting when a higher part is increased. However in which cases these change, can be freely defined. Those rules must be documented in the README.
132-
133136
## **Version Examples**
134137

135138
The following is an example of a versioning history for a component using the CNV. This is not a complete history and just highlights some examples.

0 commit comments

Comments
 (0)