Merge commit '0b211d3743f612177cf529de9dbd30e5ae5216b2' into amzn-tommy/gitflow_211116_o3de2

This commit is contained in:
Tommy Walton
2021-11-16 11:41:35 -08:00
23 changed files with 518 additions and 71 deletions
+7 -12
View File
@@ -74,11 +74,11 @@ def process_add_o3de_repo(file_name: str or pathlib.Path,
manifest_json_uri = f'{o3de_object_uri}/{manifest_json}'
manifest_json_sha256 = hashlib.sha256(manifest_json_uri.encode())
cache_file = cache_folder / str(manifest_json_sha256.hexdigest() + '.json')
if not cache_file.is_file():
parsed_uri = urllib.parse.urlparse(manifest_json_uri)
download_file_result = utils.download_file(parsed_uri, cache_file)
if download_file_result != 0:
return download_file_result
parsed_uri = urllib.parse.urlparse(manifest_json_uri)
download_file_result = utils.download_file(parsed_uri, cache_file, True)
if download_file_result != 0:
return download_file_result
# Having a repo is also optional
repo_list = []
@@ -96,7 +96,7 @@ def process_add_o3de_repo(file_name: str or pathlib.Path,
cache_file = cache_folder / str(manifest_json_sha256.hexdigest() + '.json')
if cache_file.is_file():
cache_file.unlink()
download_file_result = utils.download_file(parsed_uri, cache_file)
download_file_result = utils.download_file(parsed_uri, cache_file, True)
if download_file_result != 0:
return download_file_result
@@ -165,7 +165,7 @@ def refresh_repo(repo_uri: str,
repo_sha256 = hashlib.sha256(parsed_uri.geturl().encode())
cache_file = cache_folder / str(repo_sha256.hexdigest() + '.json')
download_file_result = utils.download_file(parsed_uri, cache_file)
download_file_result = utils.download_file(parsed_uri, cache_file, True)
if download_file_result != 0:
return download_file_result
@@ -178,12 +178,7 @@ def refresh_repo(repo_uri: str,
def refresh_repos() -> int:
json_data = manifest.load_o3de_manifest()
# clear the cache
cache_folder = manifest.get_o3de_cache_folder()
shutil.rmtree(cache_folder)
cache_folder = manifest.get_o3de_cache_folder() # will recreate it
result = 0
# set will stop circular references
Executable → Regular
View File