2020-05-13 16:23:29 +03:00
|
|
|
|
# Versioning
|
|
|
|
|
|
|
|
|
|
## Scheme
|
|
|
|
|
|
|
|
|
|
Our NuGet packages are versioned using [Semver 2.0.0][2].
|
|
|
|
|
|
|
|
|
|
This is the scheme: `OsMajor.OsMinor.InternalRelease[-prereleaseX]+sha.1b2c3d4`.
|
|
|
|
|
|
|
|
|
|
* Major: The major OS version.
|
|
|
|
|
* Minor: The minor OS version.
|
2022-05-10 10:28:39 +03:00
|
|
|
|
* Patch: Our internal release version based. This is the commit distance since
|
|
|
|
|
the Major.Minor version changed.
|
2020-05-13 16:23:29 +03:00
|
|
|
|
* Pre-release: Optional (e.g.: Xcode previews, CI, etc.)
|
|
|
|
|
* For CI we use a `ci` prefix + the branch name (cleaned up to only be
|
2022-05-10 10:28:39 +03:00
|
|
|
|
alphanumeric).
|
|
|
|
|
* Example: `iOS 15.0.123-ci.main`
|
2020-05-13 16:23:29 +03:00
|
|
|
|
* Alphanumeric means `a-zA-Z0-9-`: any character not in this range
|
|
|
|
|
will be replaced with a `-`.
|
2022-05-10 10:28:39 +03:00
|
|
|
|
* Pull requests have `pr` prefix, followed by `gh`+ PR number.
|
|
|
|
|
* Example: `tvOS 15.1.123-ci.pr.gh3333`
|
2020-05-13 16:23:29 +03:00
|
|
|
|
* If we have a particular feature we want people to subscribe to (such as
|
|
|
|
|
an Xcode release), we publish previews with a custom pre-release
|
|
|
|
|
identifier:
|
2022-05-10 10:28:39 +03:00
|
|
|
|
* Example: `iOS 15.1.123-xcode13-1.beta`
|
2020-05-13 16:23:29 +03:00
|
|
|
|
* This way people can sign up for only official previews, by
|
|
|
|
|
referencing `iOS *-xcode13-1.beta.*`
|
|
|
|
|
* It's still possible to sign up for all `xcode13-1` builds, by
|
|
|
|
|
referencing `iOS *-ci.xcode11-3.*`
|
|
|
|
|
* Build metadata: Required Hash
|
|
|
|
|
* This is `sha.` + the short commit hash.
|
|
|
|
|
* Use the short hash because the long hash is quite long and
|
|
|
|
|
cumbersome. This leaves the complete version open for duplication,
|
|
|
|
|
but this is extremely unlikely.
|
2022-05-10 10:28:39 +03:00
|
|
|
|
* Example: `iOS 14.0.123+sha.1a2b3c`
|
|
|
|
|
* Example (CI build): `iOS 15.0.123-ci.main+sha.1a2b3c`
|
2020-05-13 16:23:29 +03:00
|
|
|
|
* Since the build metadata is required for all builds, we're able to
|
|
|
|
|
recognize incomplete version numbers and determine if a particular
|
|
|
|
|
version string refers to a stable version or not.
|
2022-05-10 10:28:39 +03:00
|
|
|
|
* Example: `iOS 15.0.123`: incomplete version
|
|
|
|
|
* Example: `iOS 15.0.123+sha.1a2b3c`: stable
|
|
|
|
|
* Example: `iOS 15.0.123-ci.d17-0+sha.1a2b3c`: CI build
|
|
|
|
|
* Example: `iOS 15.0.123-xcode13-1.beta+sha.1a2b3c`: official
|
2020-05-13 16:23:29 +03:00
|
|
|
|
preview
|
|
|
|
|
* Technically it's possible to remove the prerelease part, but
|
|
|
|
|
we’d still be able to figure out it’s not a stable version by
|
|
|
|
|
using the commit hash.
|
|
|
|
|
|
|
|
|
|
[1]: https://github.com/dotnet/designs/blob/master/accepted/2018/sdk-version-scheme.md
|
|
|
|
|
[2]: https://semver.org
|