cataclysm-mods / registry

A proposed game mod registry specification for the game Cataclysm: Dark Days Ahead
Creative Commons Zero v1.0 Universal
3 stars 2 forks source link

Cataclysm Version Specification #1

Open damien opened 4 years ago

damien commented 4 years ago

Based on conversions with @kevingranade, @KorGgenT, and @davidpwbrown on C:DDA's Discord, the canonical version number of C:DDA is the Build version string. This string can be found in the VERSION.txt of any recent Cataclysm distribution or as the output of ./cataclysm --version. It looks something like this:

0.E-7-gbc88ffd

This string corresponds to the output of git describe and includes the following information:

$RELEASE_TAG-$COMMITS_SINCE-g$GIT_SHA

Where:


Releases are sorted using the following algorithm to determine if a particular release is newer or older than another based on it's version string:

RELEASE_TAG is sorted alphabetically numerically, with the last tag being the newest release. Example:

0.A <- Oldest release
0.B
0.C
0.D
0.E <- Newest release

COMMITS_SINCE is sorted numerically, with the biggest value representing the newest release. Example:

3   <- Oldest
5
7
9
10
14
20
32 <- Newest

GIT_SHA is ignored for purposes of determining if one release is older or newer than another.

Using the sorting methodology outlined above, we would end up with something like this:

0.A-2340-gdeadbeef
0.B-200-gdeadbeef
0.C-42-gdeadbeef
0.D
0.D-32-gdeadbeef
0.E
0.E-7-gdeadbeef

Note:

  1. COMMITS_SINCE is not guaranteed to appear in a version string, and is assumed to be 0 if not present
  2. GIT_SHA is not guaranteed to appear, and should be ignored for purposes of version comparison regardless