From 36bf6ddebc5010eb4c553cbe88e90489120ec7d5 Mon Sep 17 00:00:00 2001 From: Brenton Cleeland Date: Sun, 25 Feb 2024 07:12:42 +1100 Subject: [PATCH] feat: add version flag --- ready/ready.py | 5 +++++ setup.cfg | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ready/ready.py b/ready/ready.py index a056a13..7564859 100644 --- a/ready/ready.py +++ b/ready/ready.py @@ -7,6 +7,7 @@ from importlib import resources from . import checks as checks_module +VERSION = "1.2.3" from ready.checks.bad_response import ( check_bad_response_cloudflare, @@ -402,6 +403,10 @@ def usage(): def cli(): args = parse_args(sys.argv[1:]) + if "--version" in args: + print(f"ready {VERSION}") + sys.exit() + if "--doc" in args: for f in resources.files(checks_module).iterdir(): if f.name.endswith(".py"): diff --git a/setup.cfg b/setup.cfg index d2cc490..0c5b7a8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = ready-check -version = 1.2.2 +version = 1.2.3 author = Brenton Cleeland author_email = brenton@brntn.me description = A developer-friendly web scanning tool