Skip to content

Commit 13716d4

Browse files
committed
chore: implemented crdgen json output
1 parent 69526d6 commit 13716d4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

operator/src/crdgen.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ use ext_cardano_dbsync::controller;
22
use kube::CustomResourceExt;
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::DbSyncPort::crd()).unwrap()
10+
);
11+
return;
12+
}
13+
514
print!(
615
"{}",
716
serde_yaml::to_string(&controller::DbSyncPort::crd()).unwrap()

0 commit comments

Comments
 (0)