diff --git a/bundles/sshmon/files/check_github_for_new_release b/bundles/sshmon/files/check_github_for_new_release index e1e1fe8..3a50d94 100644 --- a/bundles/sshmon/files/check_github_for_new_release +++ b/bundles/sshmon/files/check_github_for_new_release @@ -37,9 +37,10 @@ try: for i in releases: if i["tag_name"].startswith(tag_prefix): - if newest_release is None or parse(i["tag_name"]) > parse( - newest_release["tag_name"] - ): + if ( + 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" @@ -50,16 +51,13 @@ try: newest_release["tag_name"], current_version ) ) - - if newest_release["prerelease"] or newest_release["draft"]: - print("Please note this is only a prerelease/draft.") - - # Don't alert people for prereleases. - exit(0) - else: - exit(2) + exit(2) else: - print("Currently installed version {} matches newest release on github".format(current_version)) + print( + "Currently installed version {} matches newest release on github".format( + current_version + ) + ) exit(0) except Exception as e: print(repr(e))