Skip to content

Commit db95bc3

Browse files
committed
[confcom] filter genpolicy releases
* When downloading a genpolicy releases, filter the list of releases to only include those that are not marked as "prerelease" or "draft" Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
1 parent 9b102ec commit db95bc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/confcom/azext_confcom/kata_proxy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def download_binaries():
4040
needed_assets = ["genpolicy", "genpolicy.exe"]
4141
# search for genpolicy in the assets from kata-container releases
4242
for release in r.json():
43-
if "genpolicy" in release.get("tag_name"):
43+
is_target = "genpolicy" in release.get("tag_name") and release.get("draft") == False and release.get("prerelease") == False
44+
if is_target:
4445
# these should be newest to oldest
4546
for asset in release["assets"]:
4647
# download the file if it contains genpolicy

0 commit comments

Comments
 (0)