From 6f6924fc7595f95d13134fd4b173011e2b083e4d Mon Sep 17 00:00:00 2001 From: Gang Li Date: Tue, 17 Dec 2024 09:11:05 +0800 Subject: [PATCH] chore: add --version flag to support version check Signed-off-by: Gang Li --- charon/cmd/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/charon/cmd/__init__.py b/charon/cmd/__init__.py index 16a0129..e2f5467 100644 --- a/charon/cmd/__init__.py +++ b/charon/cmd/__init__.py @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. """ -from click import group +from click import group, version_option, pass_context from charon.cmd.cmd_upload import upload from charon.cmd.cmd_delete import delete from charon.cmd.cmd_index import index @@ -22,7 +22,9 @@ @group() -def cli(): +@version_option() +@pass_context +def cli(ctx): """Charon is a tool to synchronize several types of artifacts repository data to Red Hat Ronda service (maven.repository.redhat.com).