1
0
mirror of https://github.com/acemod/ACE3.git synced 2024-08-30 18:23:18 +00:00

Fix undefined variable when make.py exits before builds, Rename aceVersion variable to project_version, Update regex search from CBA

This commit is contained in:
jonpas 2016-01-10 03:16:46 +01:00
parent 0397b3f9f4
commit d8853e327e

View File

@ -697,11 +697,9 @@ def version_stamp_pboprefix(module,commitID):
f.close()
if configtext:
patchestext = re.search(r"version.*?=.*?$", configtext, re.DOTALL)
if patchestext:
if re.search(r"version=(.*?)$", configtext, re.DOTALL):
if configtext:
patchestext = re.search(r"(version.*?=)(.*?)$", configtext, re.DOTALL).group(1)
configtext = re.sub(r"version(.*?)=(.*?)$", "version = {}\n".format(commitID), configtext, flags=re.DOTALL)
configtext = re.sub(r"version=(.*?)$", "version={}\n".format(commitID), configtext, flags=re.DOTALL)
f = open(configpath, "w")
f.write(configtext)
f.close()
@ -975,17 +973,16 @@ See the make.cfg file for additional build options.
print ("No cache found.")
cache = {}
# Check the ace build version (from main) with cached version - Forces a full rebuild when version changes
aceVersion = get_project_version()
# Check the build version (from main) with cached version - forces a full rebuild when version changes
project_version = get_project_version()
cacheVersion = "None";
if 'cacheVersion' in cache:
cacheVersion = cache['cacheVersion']
if (aceVersion != cacheVersion):
if (project_version != cacheVersion):
cache = {}
print("Reseting Cache {0} to New Version {1}".format(cacheVersion, aceVersion))
cache['cacheVersion'] = aceVersion
print("Reseting Cache {0} to New Version {1}".format(cacheVersion, project_version))
cache['cacheVersion'] = project_version
if not os.path.isdir(os.path.join(release_dir, project, "addons")):
try:
@ -1011,6 +1008,9 @@ See the make.cfg file for additional build options.
set_version_in_files();
print("Version in files has been changed, make sure you commit and push the updates!")
amountOfBuildsFailed = 0
namesOfBuildsFailed = []
try:
# Temporarily copy optionals_root for building. They will be removed later.
optionals_modules = []
@ -1095,9 +1095,6 @@ See the make.cfg file for additional build options.
print_error("\nFailed to delete {}".format(os.path.join(obsolete_check_path,file)))
pass
amountOfBuildsFailed = 0
namesOfBuildsFailed = []
# For each module, prep files and then build.
print_blue("\nBuilding...")
for module in modules: