Version String Format

Place all meeting requests / announcements here...
Post Reply
User avatar
macsforme
General
General
Posts: 1948
Joined: Wed Mar 01, 2006 5:43 am

Version String Format

Post by macsforme » Sat Sep 19, 2015 9:58 pm

There was recently a conversation on IRC regarding changing the version string format so it has more concise/useful information and so it is consistent across all platforms. The following is my proposal for the new format. Feel free to comment or present your own.

The general format would be:

VERSION-BUILDINFO[-FEATURE1[-FEATURE2]...]

And the expanded format would be:

MAJOR.MINOR.REVISION[.STATUS].TRUNCATEDGITHASH[.FORK]-PLATFORM.ARCHITECTURE.COMPILERVERSION[-DEBUGSTATUS][-SDLSTATUS]

MAJOR, MINOR, and REVISION would be the same version number we have now. STATUS would be where we would designate an alpha, beta, or release candidate build, such as "alpha, "beta," "rc1," etc. TRUNCATEDGITHASH would be the first eight characters of the git hash of the current version (which would be the release tag for stable releases). FORK would be a place for people who fork the project for various reasons to identify which code base the client came from; for example, I might use "embed" to identify my fork for embedded devices.

PLATFORM would be a concise description of the platform, generally one of "windows," "mac," "linux," or "solaris." I would prefer just "linux" to the "linux-gnu" that we currently have. ARCHITECTURE would be the common architecture identifier, generally one of "i386," "x86_64," "armv7," "arm64," "mips," "sparc," etc. COMPILER VERSION would be the name of the compiler plus the version with nothing in between, such as "vc10," "clang3.7.0", or "gcc4.8.4."

For the features section, "-dbg" would be added first in the case of a debug build, and "-SDL" or "-SDL2" would be added in the case of a build that includes SDL. Additional optional features could be added to this string at a later time.

These are some examples of how this would look:

Code: Select all

2.4.4.alpha.2b1a8f5c-mac.x86_64.clang3.7.0-dbg-SDL2
2.4.4.2b1a8f5c-windows.i386.vc10
2.4.4.rc2.2b1a8f5c-linux.x86_64.gcc4.8.4-SDL
2.4.4.2b1a8f5c-solaris.sparc.oss12.4-dbg
2.4.4.beta.2b1a8f5c.embed-iOS.armv7.clang3.7.0-SDL2
2.4.4.2b1a8f5c.embed-linux.mips.gcc4.9.1-dbg-SDL2
All of this information should be automatically generated either in the code or in build scripts to avoid hard-coding data which could be outdated.

EDIT: changed Xcode (which is an IDE) example to clang (which is the actual compiler), changed uclibc (which is a library) example to gcc (which is the actual compiler), and added a spot for the release status after the version.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest