Versioning for apps
semver is a standard for libraries, but it doesn't work well for apps:
- makes little to no sense for end users
- requires a lot of maintenance if you release frequently
Time-based schemes suit better, here is one I used on a past project:
YY.MM.BUILD_NUMBER
- first two components (
YY.MM
orYY.WW
) give you enough understanding on when this version was released BUILD_NUMBER
is a sequential number usually coming from your CI. It allows you to fully automate versioning and don't worry that parallel builds can get same version- test build's version can has an additional component with short commit hash
YY.MM.BUILD_NUMBER-COMMIT_SHA
, just to look different from production-ready versions
Some downsides:
- last number doesn't reset - after
22.7.123
you may get22.8.124
but not22.8.0
. It's not pretty, but not a big problem, in my opinion - impossible to use for marketing like "today we're releasing a new major version". But let's be honest, only v2 can has "special" meaning. Check release notes for apps on you phone and you'll see that some of them trying to maintain semver-like versions or even release "major" version, but it's unlikely that any users pay attention to these numbers
One more tip:
Make it easy to find version in your app. No need to show it somewhere in interface, it may be exposed as window.MY_APP_NAME_VERSION
, for example.
Meta
Created: 2022-08-01
References:
- https://calver.org/ – a few different calendar-based schemes, with project examples