From 1e1131ae35df7f29826f37a6561f90331f32b220 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cli/src/commands/deploy.rs b/lib/cli/src/commands/deploy.rs index b7548bf6255..febfe7e55d7 100644 --- a/lib/cli/src/commands/deploy.rs +++ b/lib/cli/src/commands/deploy.rs @@ -227,6 +227,10 @@ impl AsyncCliCommand for CmdDeploy { .with_context(|| format!("Could not write file: '{}'", file_path.display()))?; } + if self.fmt.format == crate::utils::render::ItemFormat::Json { + println!("{}", serde_json::to_string_pretty(&app_version)?); + } + Ok(app_version) } }