File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
cli/src/commands/build_info Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,15 @@ impl Command {
9
9
let build_env = BuildEnv :: get ( ) ;
10
10
println ! (
11
11
r#"
12
+ Version: {}
12
13
Build time: {}
13
14
Commit SHA: {}
14
15
Commit time: {}
15
16
Commit branch: {}
16
17
Rustc channel: {}
17
18
Rustc version: {}
18
19
"# ,
20
+ build_env. version,
19
21
build_env. time,
20
22
build_env. git. commit_hash,
21
23
build_env. git. commit_time,
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ pub enum SnarkerStrategy {
55
55
#[ derive( Serialize , Deserialize , Debug , Clone ) ]
56
56
pub struct BuildEnv {
57
57
pub time : String ,
58
+ pub version : String ,
58
59
pub git : GitBuildEnv ,
59
60
pub cargo : CargoBuildEnv ,
60
61
pub rustc : RustCBuildEnv ,
@@ -90,6 +91,7 @@ impl BuildEnv {
90
91
pub fn get ( ) -> Self {
91
92
Self {
92
93
time : env ! ( "VERGEN_BUILD_TIMESTAMP" ) . to_owned ( ) ,
94
+ version : env ! ( "VERGEN_GIT_DESCRIBE" ) . to_owned ( ) ,
93
95
git : GitBuildEnv {
94
96
commit_time : env ! ( "VERGEN_GIT_COMMIT_TIMESTAMP" ) . to_owned ( ) ,
95
97
commit_hash : env ! ( "VERGEN_GIT_SHA" ) . to_owned ( ) ,
You can’t perform that action at this time.
0 commit comments