diff options
author | Anton Yabchinskiy <arn@bestmx.ru> | 2014-12-03 14:49:56 +0300 |
---|---|---|
committer | Anton Yabchinskiy <arn@devline.ru> | 2014-12-04 16:32:43 +0300 |
commit | 99676d7e742ebb31b920eb37d7a955b235be35ed (patch) | |
tree | e4474598eb2b6b771a25897e0b3170059ad0ed7c /methods.py | |
parent | fff056bdc5b030e39ecfa619c8f58b20305ebeae (diff) | |
parent | 8ad12525a90d90d77dc08b3d6decae33be5675c4 (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'methods.py')
-rwxr-xr-x | methods.py | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/methods.py b/methods.py index 77da82fe24..0c0c5a05e3 100755 --- a/methods.py +++ b/methods.py @@ -1083,44 +1083,13 @@ def build_gles2_headers( target, source, env ): def update_version(): - rev = 0 + rev = "custom_build" - try: - f = open("custom_version.txt","rb") - rev = int( f.readline().strip() ) - except: - pass - - if (rev==0): - try: - f = open(".svn/entries") - line = f.readline(); - next_rev = False - while line != "": - line = line.rstrip('\r\n') - if next_rev: - rev = line - break - if line == "dir": - next_rev = True - line = f.readline(); - - if rev != 0: - f = open("version.py") - ver = f.read() - import re - ver = re.sub(r'\$Rev: \d* \$', '$Rev: '+str(rev)+' $', ver) - f = open("version.py", "wb") - f.write(ver) - f.close() - - except: - pass - + if (os.getenv("BUILD_REVISION")!=None): + rev=os.getenv("BUILD_REVISION") + print("Using custom revision: "+rev) import version - - rev=version.revision - rev=rev[5:-1].strip() + f=open("core/version.h","wb") f.write("#define VERSION_SHORT_NAME "+str(version.short_name)+"\n") |