From d7dfa415f2e8336f162721c31cb8763d7ac1b67f Mon Sep 17 00:00:00 2001 From: Christoph Herzog Date: Wed, 28 Feb 2024 15:43:59 +0100 Subject: [PATCH] feat(cli): "wasmer deploy": return app version as json if --json specified This can help in CI workflows and will also be used in tests. --- lib/cli/src/commands/deploy.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/cli/src/commands/deploy.rs b/lib/cli/src/commands/deploy.rs index b7548bf6255..4697669a23f 100644 --- a/lib/cli/src/commands/deploy.rs +++ b/lib/cli/src/commands/deploy.rs @@ -227,6 +227,13 @@ impl AsyncCliCommand for CmdDeploy { .with_context(|| format!("Could not write file: '{}'", file_path.display()))?; } + match self.fmt.format { + crate::utils::render::ItemFormat::Json => { + println!("{}", serde_json::to_string_pretty(&app_version)?); + } + _ => {} + } + Ok(app_version) } }