Skip to content

Commit 8f49033

Browse files
paulobressanverbotenj
authored andcommitted
Implemented crdgen json output (demeter-run#69)
* chore: implemented crdgen json output * chore: implemented crdgen json output
1 parent 2ca79e3 commit 8f49033

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

operator/src/crdgen.rs

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ use kube::CustomResourceExt;
22
use operator::controller;
33

44
fn main() {
5+
let args: Vec<String> = std::env::args().collect();
6+
if args.len() > 1 && args[1] == "json" {
7+
print!(
8+
"{}",
9+
serde_json::to_string_pretty(&controller::OgmiosPort::crd()).unwrap()
10+
);
11+
return;
12+
}
13+
514
print!(
615
"{}",
716
serde_yaml::to_string(&controller::OgmiosPort::crd()).unwrap()

0 commit comments

Comments
 (0)