From c259521e5e7985176d9ed19b4be509c4e820d954 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 13 Aug 2012 21:32:08 +0100 Subject: [PATCH] Allow specifying the snapshot ID --- SConscript | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SConscript b/SConscript index 796ed9701..85e6794db 100644 --- a/SConscript +++ b/SConscript @@ -46,6 +46,7 @@ AddOption('--save-version',dest="save-version",default=False,help="Save version. AddOption('--minor-version',dest="minor-version",default=False,help="Minor version.") AddOption('--build-number',dest="build-number",default=False,help="Build number.") AddOption('--snapshot',dest="snapshot",action='store_true',default=False,help="Snapshot build.") +AddOption('--snapshot-id',dest="snapshot-id",default=False,help="Snapshot build ID.") AddOption('--aao', dest="everythingAtOnce", action='store_true', default=False, help="Compile the whole game without generating intermediate objects (very slow), enable this when using compilers like clang or mscc that don't support -fkeep-inline-functions") @@ -158,8 +159,11 @@ if(GetOption('beta')): if(not GetOption('snapshot') and not GetOption('beta') and not GetOption('release')): env.Append(CPPDEFINES='SNAPSHOT_ID=0') env.Append(CPPDEFINES='SNAPSHOT') -elif(GetOption('snapshot')): - env.Append(CPPDEFINES=['SNAPSHOT_ID=' + str(int(time.time()))]) +elif(GetOption('snapshot') or GetOption('snapshot-id')): + if(GetOption('snapshot-id')): + env.Append(CPPDEFINES=['SNAPSHOT_ID=' + GetOption('snapshot-id')]) + else: + env.Append(CPPDEFINES=['SNAPSHOT_ID=' + str(int(time.time()))]) env.Append(CPPDEFINES='SNAPSHOT') if(GetOption('save-version')):