diff --git a/skare3_tools/scripts/skare3_promote.py b/skare3_tools/scripts/skare3_promote.py index c009ddb..74f8f6c 100755 --- a/skare3_tools/scripts/skare3_promote.py +++ b/skare3_tools/scripts/skare3_promote.py @@ -30,9 +30,10 @@ TO_CHANNEL = "flight" FROM_CHANNELS = ["test", "masters"] PLATFORM_OPTIONS = { - "linux-64": {"linux": True, "linux64": True}, - "osx-64": {"osx": True, "osx64": True}, - "win-64": {"win": True, "win64": True}, + "linux-64": {"linux": True, "linux64": True, "arm64": False}, + "osx-64": {"osx": True, "osx64": True, "arm64": False}, + "osx-arm64": {"osx": True, "osx64": True, "arm64": True}, + "win-64": {"win": True, "win64": True, "arm64": False}, } SECTIONS = ["run"] @@ -122,7 +123,6 @@ def promote(package, args, platforms=None): f" not found for platform {platform}." ) continue - if pkgs is not None: package_names += [package["name"]] pkg_files += pkgs @@ -137,7 +137,7 @@ def promote(package, args, platforms=None): r"(?P\S+)(\s+)?(==(\s+)?(?P\S+))?", requirement_str ) if match: - requirement = m.groupdict() + requirement = match.groupdict() pkgs = _files_to_copy( requirement, @@ -146,6 +146,7 @@ def promote(package, args, platforms=None): args.to_channel, args.from_channels, ) + if pkgs is not None: if requirement["name"] not in package_names: package_names.append(requirement["name"]) @@ -178,11 +179,28 @@ def promote(package, args, platforms=None): "| {noarch:24s} {noarch-src:7s} " "| {linux-64:24s} {linux-64-src:7s} " "| {osx-64:24s} {osx-64-src:7s} " + "| {osx-arm64:24s} {osx-arm64-src:7s} " "| {win-64:24s} {win-64-src:7s} |" ) - div = {"package": "", "noarch": "", "linux-64": "", "osx-64": "", "win-64": ""} + div = { + "package": "", + "noarch": "", + "linux-64": "", + "osx-64": "", + "osx-arm64": "", + "win-64": "", + } div.update( - {k: "" for k in ["noarch-src", "linux-64-src", "osx-64-src", "win-64-src"]} + { + k: "" + for k in [ + "noarch-src", + "linux-64-src", + "osx-64-src", + "osx-arm64-src", + "win-64-src", + ] + } ) div = row.format(**div).replace(" ", "-").replace("|", "+") header = { @@ -190,10 +208,20 @@ def promote(package, args, platforms=None): "noarch": "noarch", "linux-64": "linux-64", "osx-64": "osx-64", + "osx-arm64": "osx-arm64", "win-64": "win-64", } header.update( - {k: "" for k in ["noarch-src", "linux-64-src", "osx-64-src", "win-64-src"]} + { + k: "" + for k in [ + "noarch-src", + "linux-64-src", + "osx-64-src", + "osx-arm64-src", + "win-64-src", + ] + } ) header = row.format(**header) logging.info(div) @@ -206,10 +234,12 @@ def promote(package, args, platforms=None): "noarch", "linux-64", "osx-64", + "osx-arm64", "win-64", "noarch-src", "linux-64-src", "osx-64-src", + "osx-arm64-src", "win-64-src", ] } diff --git a/skare3_tools/test_results.py b/skare3_tools/test_results.py index d01e6b2..e4f79ed 100755 --- a/skare3_tools/test_results.py +++ b/skare3_tools/test_results.py @@ -71,11 +71,11 @@ def remove(uid=None, directory=None, uids=(), directories=()): directories += [SKARE3_TEST_DATA / directory] # make sure all directories are absolute and within the data tree - for direct in directories: - if SKARE3_TEST_DATA not in direct.resolve().parents: - LOGGER.warning(f"warning: {direct} not in SKARE3_DASH_DATA. Ignoring") + for drctry in directories: + if SKARE3_TEST_DATA not in drctry.resolve().parents: + LOGGER.warning(f"warning: {drctry} not in SKARE3_DASH_DATA. Ignoring") directories = [ - direct for direct in directories if SKARE3_TEST_DATA in direct.resolve().parents + drctry for drctry in directories if SKARE3_TEST_DATA in drctry.resolve().parents ] # make a list of everything that will be removed @@ -89,10 +89,10 @@ def remove(uid=None, directory=None, uids=(), directories=()): test_result_index.remove(tr) shutil.rmtree(SKARE3_TEST_DATA / tr["destination"]) - for direct in directories: - if direct.exists(): + for drctry in directories: + if drctry.exists(): LOGGER.warning( - f"The directory {direct} is still there." + f"The directory {drctry} is still there." "This does not happen unless the directory is already not in the index," "in which case it is safe to remove it by hand." )