Skip to content

Commit d5d231e

Browse files
committed
Remove build timestamp
1 parent 5e4b059 commit d5d231e

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

crates/op-rbuilder/build.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use vergen_git2::Git2Builder;
2828
fn main() -> Result<(), Box<dyn Error>> {
2929
let mut emitter = Emitter::default();
3030

31-
let build_builder = BuildBuilder::default().build_timestamp(true).build()?;
31+
let build_builder = BuildBuilder::default().build_timestamp(false).build()?;
3232

3333
emitter.add_instructions(&build_builder)?;
3434

@@ -99,14 +99,10 @@ fn main() -> Result<(), Box<dyn Error>> {
9999
println!("cargo:rustc-env=OP_RBUILDER_LONG_VERSION_0=Version: {pkg_version}{version_suffix}");
100100
println!("cargo:rustc-env=OP_RBUILDER_LONG_VERSION_1=Commit SHA: {sha}");
101101
println!(
102-
"cargo:rustc-env=OP_RBUILDER_LONG_VERSION_2=Build Timestamp: {}",
103-
env::var("VERGEN_BUILD_TIMESTAMP")?
104-
);
105-
println!(
106-
"cargo:rustc-env=OP_RBUILDER_LONG_VERSION_3=Build Features: {}",
102+
"cargo:rustc-env=OP_RBUILDER_LONG_VERSION_2=Build Features: {}",
107103
env::var("VERGEN_CARGO_FEATURES")?
108104
);
109-
println!("cargo:rustc-env=OP_RBUILDER_LONG_VERSION_4=Build Profile: {profile}");
105+
println!("cargo:rustc-env=OP_RBUILDER_LONG_VERSION_3=Build Profile: {profile}");
110106

111107
// The version information for op-rbuilder formatted for P2P (devp2p).
112108
// - The latest version from Cargo.toml

crates/op-rbuilder/src/metrics.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ pub const CARGO_PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
1212
/// The 8 character short SHA of the latest commit.
1313
pub const VERGEN_GIT_SHA: &str = env!("VERGEN_GIT_SHA_SHORT");
1414

15-
/// The build timestamp.
16-
pub const VERGEN_BUILD_TIMESTAMP: &str = env!("VERGEN_BUILD_TIMESTAMP");
1715

1816
/// The target triple.
1917
pub const VERGEN_CARGO_TARGET_TRIPLE: &str = env!("VERGEN_CARGO_TARGET_TRIPLE");
@@ -36,13 +34,10 @@ pub const LONG_VERSION: &str = concat!(
3634
env!("OP_RBUILDER_LONG_VERSION_2"),
3735
"\n",
3836
env!("OP_RBUILDER_LONG_VERSION_3"),
39-
"\n",
40-
env!("OP_RBUILDER_LONG_VERSION_4"),
4137
);
4238

4339
pub const VERSION: VersionInfo = VersionInfo {
4440
version: CARGO_PKG_VERSION,
45-
build_timestamp: VERGEN_BUILD_TIMESTAMP,
4641
cargo_features: VERGEN_CARGO_FEATURES,
4742
git_sha: VERGEN_GIT_SHA,
4843
target_triple: VERGEN_CARGO_TARGET_TRIPLE,
@@ -188,8 +183,6 @@ pub fn record_flag_gauge_metrics(builder_args: &OpRbuilderArgs) {
188183
pub struct VersionInfo {
189184
/// The version of the application.
190185
pub version: &'static str,
191-
/// The build timestamp of the application.
192-
pub build_timestamp: &'static str,
193186
/// The cargo features enabled for the build.
194187
pub cargo_features: &'static str,
195188
/// The Git SHA of the build.
@@ -203,9 +196,8 @@ pub struct VersionInfo {
203196
impl VersionInfo {
204197
/// This exposes reth's version information over prometheus.
205198
pub fn register_version_metrics(&self) {
206-
let labels: [(&str, &str); 6] = [
199+
let labels: [(&str, &str); 5] = [
207200
("version", self.version),
208-
("build_timestamp", self.build_timestamp),
209201
("cargo_features", self.cargo_features),
210202
("git_sha", self.git_sha),
211203
("target_triple", self.target_triple),

0 commit comments

Comments
 (0)