From 1d35ea22eaf65b3e0f9a986caa41859501f38701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Fri, 5 Apr 2024 15:07:04 +0200 Subject: [PATCH] Add a new `argos version` command outputing the version. --- argos/__init__.py | 1 + argos/commands.py | 6 ++++++ docs/cli.md | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/argos/__init__.py b/argos/__init__.py index e69de29..1cf6267 100644 --- a/argos/__init__.py +++ b/argos/__init__.py @@ -0,0 +1 @@ +VERSION = "0.1.0" diff --git a/argos/commands.py b/argos/commands.py index 6de52ce..c83e550 100644 --- a/argos/commands.py +++ b/argos/commands.py @@ -9,6 +9,7 @@ from alembic import command from alembic.config import Config from argos import logging +from argos import VERSION from argos.agent import ArgosAgent @@ -40,6 +41,11 @@ def server(): pass +@cli.command() +def version(): + click.echo(VERSION) + + @cli.command() @click.argument("server_url", envvar="ARGOS_AGENT_SERVER_URL") @click.argument("auth", envvar="ARGOS_AGENT_TOKEN") diff --git a/docs/cli.md b/docs/cli.md index 2e70714..472f8d6 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -26,8 +26,9 @@ Options: --help Show this message and exit. Commands: - agent Get and run tasks to the provided server. + agent Get and run tasks to the provided server. server + version ```