Version grammar
How Ripstop reads and orders version strings. Getting this wrong is how a force-update rule walls the wrong people, so it is specified rather than left to each platform’s idea of semver.
The grammar
[0-9]+(\.[0-9]+){0,3} ( -prerelease )? ( +build )?- Up to four segments, because Android versionNames are routinely
4.11.0.2. - Missing segments are zero:
1.2and1.2.0are the same version. - Leading zeros are insignificant:
01.002.0003equals1.2.3. - Build metadata is ignored entirely:
1.2.3+45equals1.2.3. - A pre-release precedes its release:
3.0.0-rc.1is below3.0.0.
Pre-release ordering
Semver 2.0 rules, compared identifier by identifier:
| Rule | Example |
|---|---|
| Numeric identifiers compare numerically | rc.2 < rc.10 |
| Numeric sorts before alphanumeric | 1.0.0-1 < 1.0.0-alpha |
| Alphanumeric compares lexically | alpha < beta |
| A shorter prefix sorts first | 1.0.0-alpha < 1.0.0-alpha.1 |
Strings that are not versions
Anything outside the grammar is invalid, and invalid is not an error. Version-dependent rules simply do not match, so the decision falls through to none and the app runs.
This is deliberate: a typo in your version string must never be able to lock a user out. Maintenance is unaffected either way: it applies to every build, so it never consults the version at all.