Skip to content

Commit

Permalink
fix: platform regex skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbraun89 authored Apr 22, 2023
1 parent 59675f8 commit 397d34d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nanolayer/installers/gh_release/resolvers/asset_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def __init__(self, name: str, regex: str, negative: bool) -> None:
self.negative = negative

def __call__(self, asset: "AssetResolver.ReleaseAsset") -> bool:
print(self.name)
matches = len(re.findall(self.regex, asset.name))
return matches > 0 if not self.negative else matches == 0

Expand Down Expand Up @@ -177,7 +178,7 @@ def resolve(
# add all non-current bitness as a negative filters
bad_bitness_regexes = deepcopy(cls.BITNESS_REGEX_MAP)
bad_bitness_regexes.pop(LinuxInformationDesk.get_bitness())
negative_platform_filters = [
negative_bitness_filters = [
cls.FindAllRegexFilter(name=name, regex=regex, negative=True)
for name, regex in bad_bitness_regexes.items()
]
Expand All @@ -190,6 +191,7 @@ def resolve(
negative_architecture_filters
+ negative_misc_filters
+ negative_platform_filters
+ negative_bitness_filters
)
),
assets,
Expand Down

0 comments on commit 397d34d

Please sign in to comment.