From 3bcf7ad714f86bf8dbc32ba9173f61a8c0cfdfc2 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 29 Mar 2025 18:13:07 +0100 Subject: [PATCH] bunndles/sshmon: fix update checks --- bundles/sshmon/files/check_forgejo_for_new_release | 4 ++-- bundles/sshmon/files/check_github_for_new_release | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bundles/sshmon/files/check_forgejo_for_new_release b/bundles/sshmon/files/check_forgejo_for_new_release index 3db5bcd..99dcd30 100644 --- a/bundles/sshmon/files/check_forgejo_for_new_release +++ b/bundles/sshmon/files/check_forgejo_for_new_release @@ -38,10 +38,10 @@ try: for i in releases: if i["tag_name"].startswith(tag_prefix): - if ( + if not (i["prerelease"] or i["draft"]) and ( newest_release is None or parse(i["tag_name"]) > parse(newest_release["tag_name"]) - ) and not (i["prerelease"] or i["draft"]): + ): newest_release = i assert newest_release is not None, "Could not determine latest release" diff --git a/bundles/sshmon/files/check_github_for_new_release b/bundles/sshmon/files/check_github_for_new_release index 3a50d94..ec510de 100644 --- a/bundles/sshmon/files/check_github_for_new_release +++ b/bundles/sshmon/files/check_github_for_new_release @@ -37,10 +37,10 @@ try: for i in releases: if i["tag_name"].startswith(tag_prefix): - if ( + if not (i["prerelease"] or i["draft"]) and ( newest_release is None or parse(i["tag_name"]) > parse(newest_release["tag_name"]) - ) and not (i["prerelease"] or i["draft"]): + ): newest_release = i assert newest_release is not None, "Could not determine latest release"