File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 11use crate :: {
22 builders:: BuilderMode ,
3- metrics:: { CARGO_PKG_VERSION , VERGEN_GIT_SHA } ,
3+ metrics:: { LONG_VERSION , SHORT_VERSION } ,
44} ;
55use clap_builder:: { CommandFactory , FromArgMatches } ;
66pub use op:: { FlashblocksArgs , OpRbuilderArgs , TelemetryArgs } ;
@@ -82,7 +82,8 @@ impl CliExt for Cli {
8282 /// Parses commands and overrides versions
8383 fn set_version ( ) -> Self {
8484 let matches = Cli :: command ( )
85- . version ( format ! ( "{CARGO_PKG_VERSION} ({VERGEN_GIT_SHA})" ) )
85+ . version ( SHORT_VERSION )
86+ . long_version ( LONG_VERSION )
8687 . about ( "Block builder designed for the Optimism stack" )
8788 . author ( "Flashbots" )
8889 . name ( "op-rbuilder" )
Original file line number Diff line number Diff line change @@ -24,6 +24,22 @@ pub const VERGEN_CARGO_FEATURES: &str = env!("VERGEN_CARGO_FEATURES");
2424/// The build profile name.
2525pub const BUILD_PROFILE_NAME : & str = env ! ( "OP_RBUILDER_BUILD_PROFILE" ) ;
2626
27+ /// The short version information for op-rbuilder.
28+ pub const SHORT_VERSION : & str = env ! ( "OP_RBUILDER_SHORT_VERSION" ) ;
29+
30+ /// The long version information for op-rbuilder.
31+ pub const LONG_VERSION : & str = concat ! (
32+ env!( "OP_RBUILDER_LONG_VERSION_0" ) ,
33+ "\n " ,
34+ env!( "OP_RBUILDER_LONG_VERSION_1" ) ,
35+ "\n " ,
36+ env!( "OP_RBUILDER_LONG_VERSION_2" ) ,
37+ "\n " ,
38+ env!( "OP_RBUILDER_LONG_VERSION_3" ) ,
39+ "\n " ,
40+ env!( "OP_RBUILDER_LONG_VERSION_4" ) ,
41+ ) ;
42+
2743pub const VERSION : VersionInfo = VersionInfo {
2844 version : CARGO_PKG_VERSION ,
2945 build_timestamp : VERGEN_BUILD_TIMESTAMP ,
You can’t perform that action at this time.
0 commit comments