docs: Document new versioning scheme Signed-off-by: Simon McVittie <smcv@collabora.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
diff --git a/docs/README-versions.md b/docs/README-versions.md
new file mode 100644
index 0000000..097dba1
--- /dev/null
+++ b/docs/README-versions.md
@@ -0,0 +1,60 @@
+# Versioning
+
+## Since 2.23.0
+
+SDL follows an "odd/even" versioning policy, similar to GLib, GTK, Flatpak
+and older versions of the Linux kernel:
+
+* The major version (first part) increases when backwards compatibility
+ is broken, which will happen infrequently.
+
+* If the minor version (second part) is divisible by 2
+ (for example 2.24.x, 2.26.x), this indicates a version of SDL that
+ is believed to be stable and suitable for production use.
+
+ * In stable releases, the patchlevel or micro version (third part)
+ indicates bugfix releases. Bugfix releases should not add or
+ remove ABI, so the ".0" release (for example 2.24.0) should be
+ forwards-compatible with all the bugfix releases from the
+ same cycle (for example 2.24.1).
+
+ * The minor version increases when new API or ABI is added, or when
+ other significant changes are made. Newer minor versions are
+ backwards-compatible, but not fully forwards-compatible.
+ For example, programs built against SDL 2.24.x should work fine
+ with SDL 2.26.x, but programs built against SDL 2.26.x will not
+ necessarily work with 2.24.x.
+
+* If the minor version (second part) is not divisible by 2
+ (for example 2.23.x, 2.25.x), this indicates a development prerelease
+ of SDL that is not suitable for stable software distributions.
+ Use with caution.
+
+ * The patchlevel or micro version (third part) increases with
+ each prerelease.
+
+ * Each prerelease might add new API and/or ABI.
+
+ * Prereleases are backwards-compatible with older stable branches.
+ For example, 2.25.x will be backwards-compatible with 2.24.x.
+
+ * Prereleases are not guaranteed to be backwards-compatible with
+ each other. For example, new API or ABI added in 2.25.1
+ might be removed or changed in 2.25.2.
+ If this would be a problem for you, please do not use prereleases.
+
+ * Only upgrade to a prerelease if you can guarantee that you will
+ promptly upgrade to the stable release that follows it.
+ For example, do not upgrade to 2.23.x unless you will be able to
+ upgrade to 2.24.0 when it becomes available.
+
+ * Software distributions that have a freeze policy (in particular Linux
+ distributions with a release cycle, such as Debian and Fedora)
+ should usually only package stable releases, and not prereleases.
+
+## Before 2.23.0
+
+Older versions of SDL followed a similar policy, but instead of the
+odd/even rule applying to the minor version, it applied to the patchlevel
+(micro version, third part). For example, 2.0.22 was a stable release
+and 2.0.21 was a prerelease.
diff --git a/docs/README.md b/docs/README.md
index fd0078a..d9953c0 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -47,6 +47,7 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
- [PSP](README-psp.md)
- [Raspberry Pi](README-raspberrypi.md)
- [Touch](README-touch.md)
+- [Versions](README-versions.md)
- [WinCE](README-wince.md)
- [Windows](README-windows.md)
- [WinRT](README-winrt.md)