@@ -8,7 +8,7 @@ mod znode_controller;
8
8
use crate :: zk_controller:: ZK_CONTROLLER_NAME ;
9
9
use crate :: znode_controller:: ZNODE_CONTROLLER_NAME ;
10
10
11
- use clap:: Parser ;
11
+ use clap:: { crate_description , crate_version , Parser } ;
12
12
use futures:: StreamExt ;
13
13
use stackable_operator:: {
14
14
cli:: { Command , ProductOperatorRun } ,
@@ -28,13 +28,14 @@ use std::sync::Arc;
28
28
29
29
mod built_info {
30
30
include ! ( concat!( env!( "OUT_DIR" ) , "/built.rs" ) ) ;
31
+ pub const TARGET_PLATFORM : Option < & str > = option_env ! ( "TARGET" ) ;
31
32
}
32
33
33
34
const APP_NAME : & str = "zookeeper" ;
34
35
const OPERATOR_NAME : & str = "zookeeper.stackable.tech" ;
35
36
36
37
#[ derive( clap:: Parser ) ]
37
- #[ clap( about = built_info :: PKG_DESCRIPTION , author = stackable_operator :: cli :: AUTHOR ) ]
38
+ #[ clap( about, author) ]
38
39
struct Opts {
39
40
#[ clap( subcommand) ]
40
41
cmd : Command ,
@@ -59,10 +60,10 @@ async fn main() -> anyhow::Result<()> {
59
60
tracing_target,
60
61
) ;
61
62
stackable_operator:: utils:: print_startup_string (
62
- built_info :: PKG_DESCRIPTION ,
63
- built_info :: PKG_VERSION ,
63
+ crate_description ! ( ) ,
64
+ crate_version ! ( ) ,
64
65
built_info:: GIT_VERSION ,
65
- built_info:: TARGET ,
66
+ built_info:: TARGET_PLATFORM . unwrap_or ( "unknown target" ) ,
66
67
built_info:: BUILT_TIME_UTC ,
67
68
built_info:: RUSTC_VERSION ,
68
69
) ;
0 commit comments