Skip to content

Commit

Permalink
Include build number in version text
Browse files Browse the repository at this point in the history
Only for non-stable builds. Stable builds just go by their actual version number.
This commit affects Mac and Linux only.
  • Loading branch information
skyjake committed May 6, 2011
1 parent 512f313 commit fc6e566
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion distrib/platform_release.py
Expand Up @@ -105,7 +105,7 @@ def mac_release():
os.chdir(WORK_DIR)
mkdir('release_build')
os.chdir('release_build')
if os.system('cmake -D MACOS_VERSION=' + mac_os_version() + ' ' + DOOMSDAY_DIR + ' && make'):
if os.system('cmake -D DOOMSDAY_BUILD_TEXT="' + DOOMSDAY_BUILD + '" -D MACOS_VERSION=' + mac_os_version() + ' ' + DOOMSDAY_DIR + ' && make'):
raise Exception("Failed to build from source.")

# Now we can proceed to packaging.
Expand Down Expand Up @@ -224,6 +224,7 @@ def linux_release():
if os.system('cmake -D SYSTEMARCH=`dpkg --print-architecture`' +
' -D DOOMSDAY_VERSION=' + DOOMSDAY_VERSION +
' -D DOOMSDAY_BUILD=' + DOOMSDAY_BUILD +
' -D DOOMSDAY_BUILD_TEXT="' + DOOMSDAY_BUILD + '"' +
' -D CMAKE_INSTALL_PREFIX=/usr ../../doomsday && fakeroot make package'):
raise Exception("Failure to build from source.")

Expand Down
6 changes: 5 additions & 1 deletion doomsday/engine/portable/include/dd_version.h
Expand Up @@ -69,7 +69,11 @@
* DOOMSDAY_VERSION unless you wish to break compatibility.
*/
#define DOOMSDAY_VERSION 10900 // Don't touch; see above.
#if defined(DOOMSDAY_RELEASE_NAME)

#if defined(DOOMSDAY_BUILD_TEXT)
/** The build number is included only for non-Stable builds. */
# define DOOMSDAY_VERSION_TEXT DOOMSDAY_VERSION_BASE " (#" DOOMSDAY_BUILD_TEXT ")"
#elif defined(DOOMSDAY_RELEASE_NAME)
# define DOOMSDAY_VERSION_TEXT DOOMSDAY_VERSION_BASE "-" DOOMSDAY_RELEASE_NAME
#else
# define DOOMSDAY_VERSION_TEXT DOOMSDAY_VERSION_BASE
Expand Down

0 comments on commit fc6e566

Please sign in to comment.