Skip to content

Commit cff372a

Browse files
authored
feat: Show node version (#1096)
* feat(rpc): Include version in `/build_env` response * feat(build-info): Show version too
1 parent af890e7 commit cff372a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

cli/src/commands/build_info/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ impl Command {
99
let build_env = BuildEnv::get();
1010
println!(
1111
r#"
12+
Version: {}
1213
Build time: {}
1314
Commit SHA: {}
1415
Commit time: {}
1516
Commit branch: {}
1617
Rustc channel: {}
1718
Rustc version: {}
1819
"#,
20+
build_env.version,
1921
build_env.time,
2022
build_env.git.commit_hash,
2123
build_env.git.commit_time,

node/src/config.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ pub enum SnarkerStrategy {
5555
#[derive(Serialize, Deserialize, Debug, Clone)]
5656
pub struct BuildEnv {
5757
pub time: String,
58+
pub version: String,
5859
pub git: GitBuildEnv,
5960
pub cargo: CargoBuildEnv,
6061
pub rustc: RustCBuildEnv,
@@ -90,6 +91,7 @@ impl BuildEnv {
9091
pub fn get() -> Self {
9192
Self {
9293
time: env!("VERGEN_BUILD_TIMESTAMP").to_owned(),
94+
version: env!("VERGEN_GIT_DESCRIBE").to_owned(),
9395
git: GitBuildEnv {
9496
commit_time: env!("VERGEN_GIT_COMMIT_TIMESTAMP").to_owned(),
9597
commit_hash: env!("VERGEN_GIT_SHA").to_owned(),

0 commit comments

Comments
 (0)