Add a new argos version command outputing the version.

This commit is contained in:
Alexis Métaireau 2024-04-05 15:07:04 +02:00 committed by Luc Didry
parent 1dc91a246a
commit 1d35ea22ea
No known key found for this signature in database
GPG key ID: EA868E12D0257E3C
3 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1 @@
VERSION = "0.1.0"

View file

@ -9,6 +9,7 @@ from alembic import command
from alembic.config import Config from alembic.config import Config
from argos import logging from argos import logging
from argos import VERSION
from argos.agent import ArgosAgent from argos.agent import ArgosAgent
@ -40,6 +41,11 @@ def server():
pass pass
@cli.command()
def version():
click.echo(VERSION)
@cli.command() @cli.command()
@click.argument("server_url", envvar="ARGOS_AGENT_SERVER_URL") @click.argument("server_url", envvar="ARGOS_AGENT_SERVER_URL")
@click.argument("auth", envvar="ARGOS_AGENT_TOKEN") @click.argument("auth", envvar="ARGOS_AGENT_TOKEN")

View file

@ -28,6 +28,7 @@ Options:
Commands: Commands:
agent Get and run tasks to the provided server. agent Get and run tasks to the provided server.
server server
version
``` ```
<!--[[[end]]] <!--[[[end]]]