Merge pull request #3136 from jonpas/updateMake

Fix make.py undefined variable and regex
This commit is contained in:
Thomas Kooi 2016-02-20 17:32:19 +01:00
commit 1b80f68033

View File

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