From cca150aff45557c5149a12638cf9da7cc4e028b5 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 1 Apr 2023 15:42:18 +0200 Subject: Add version API. --- src/bin/zot/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/bin') diff --git a/src/bin/zot/main.rs b/src/bin/zot/main.rs index d09b5d4..7f49eb4 100644 --- a/src/bin/zot/main.rs +++ b/src/bin/zot/main.rs @@ -38,6 +38,9 @@ async fn main() -> Result<(), Box<(dyn std::error::Error + 'static)>> { (@subcommand verify => (about: "Verify") ) + (@subcommand version => + (about: "Return the version of a server.") + ) (@subcommand channel => (about: "Fetch the channel stream") ) @@ -90,6 +93,10 @@ async fn main() -> Result<(), Box<(dyn std::error::Error + 'static)>> { let channel = z.verify().await; println!("{:?}", channel); } + + ("version", Some(_)) => { + println!("{}", z.version().await?); + } /* ("channel", Some(m)) => { let raw = m.is_present("raw"); -- cgit v1.2.3