Merge branch 'main/rendor-staging' into main/atys-live
[ryzomcore.git] / win-build / patch_version.py
blobd4693b5505ebae8329f8c0000d7cda4658b9dade
1 import os
2 rcRoot = os.environ['RC_ROOT']
3 newVersion = 1
4 vstr = str(newVersion).zfill(5)
5 vpath = rcRoot + "\\pipeline\\client_patch\\patch\\" + vstr
6 while os.path.exists(vpath):
7 newVersion = newVersion + 1
8 vstr = str(newVersion).zfill(5)
9 vpath = rcRoot + "\\pipeline\\client_patch\\patch\\" + vstr
10 clientPatchVersion = newVersion
11 newVersion = 1
12 vstr = str(newVersion).zfill(6)
13 vpath = rcRoot + "\\pipeline\\bridge_server\\" + vstr
14 while os.path.exists(vpath):
15 newVersion = newVersion + 1
16 vstr = str(newVersion).zfill(6)
17 vpath = rcRoot + "\\pipeline\\bridge_server\\" + vstr
18 serverPatchVersion = newVersion
19 bf = open(rcRoot + "\\build\\patch_version_set.bat", "w")
20 bf.write("set CLIENT_PATCH_VERSION=" + str(clientPatchVersion) + "\n")
21 bf.write("set SERVER_PATCH_VERSION=" + str(serverPatchVersion) + "\n")
22 bf.close()