fixed the automatic versioning

This commit is contained in:
Magnus Auvinen 2010-05-29 15:20:18 +00:00
parent 4c0886f087
commit fe5a7105c4
2 changed files with 8 additions and 4 deletions

View file

@ -28,4 +28,10 @@ f = ""
for filename in sys.argv[1:]:
f += cstrip([l.strip() for l in file(filename)])
print '#define GAME_NETVERSION_HASH "%s"' % hashlib.md5(f).hexdigest().lower()[16:]
hash = hashlib.md5(f).hexdigest().lower()[16:]
# TODO: refactor hash that is equal to the 0.5 hash, remove when we
# TODO: remove when we don't need it any more
if hash == "7e33344691ca8a61":
hash = "b67d1f1a1eea234e"
print '#define GAME_NETVERSION_HASH "%s"' % hash

View file

@ -2,7 +2,5 @@
#define GAME_VERSION_H
#include "generated/nethash.c"
#define GAME_VERSION "trunk"
//#define GAME_NETVERSION "0.5 " GAME_NETVERSION_HASH
// TODO: hash forced during refactoring. Remove later on
#define GAME_NETVERSION "0.5 b67d1f1a1eea234e"
#define GAME_NETVERSION "0.5 " GAME_NETVERSION_HASH
#endif