Skip to content

Commit 6fae7bb

Browse files
committed
Remove timestamp for reproducible builds
1 parent 784ad05 commit 6fae7bb

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

crates/op-rbuilder/build.rs

Lines changed: 1 addition & 6 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()?;
3232

3333
emitter.add_instructions(&build_builder)?;
3434

@@ -92,16 +92,11 @@ fn main() -> Result<(), Box<dyn Error>> {
9292
// ```text
9393
// Version: 0.1.0
9494
// Commit SHA: defa64b2
95-
// Build Timestamp: 2023-05-19T01:47:19.815651705Z
9695
// Build Features: jemalloc
9796
// Build Profile: maxperf
9897
// ```
9998
println!("cargo:rustc-env=OP_RBUILDER_LONG_VERSION_0=Version: {pkg_version}{version_suffix}");
10099
println!("cargo:rustc-env=OP_RBUILDER_LONG_VERSION_1=Commit SHA: {sha}");
101-
println!(
102-
"cargo:rustc-env=OP_RBUILDER_LONG_VERSION_2=Build Timestamp: {}",
103-
env::var("VERGEN_BUILD_TIMESTAMP")?
104-
);
105100
println!(
106101
"cargo:rustc-env=OP_RBUILDER_LONG_VERSION_3=Build Features: {}",
107102
env::var("VERGEN_CARGO_FEATURES")?

crates/op-rbuilder/src/metrics.rs

Lines changed: 1 addition & 7 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");
@@ -26,7 +24,6 @@ pub const BUILD_PROFILE_NAME: &str = env!("OP_RBUILDER_BUILD_PROFILE");
2624

2725
pub const VERSION: VersionInfo = VersionInfo {
2826
version: CARGO_PKG_VERSION,
29-
build_timestamp: VERGEN_BUILD_TIMESTAMP,
3027
cargo_features: VERGEN_CARGO_FEATURES,
3128
git_sha: VERGEN_GIT_SHA,
3229
target_triple: VERGEN_CARGO_TARGET_TRIPLE,
@@ -172,8 +169,6 @@ pub fn record_flag_gauge_metrics(builder_args: &OpRbuilderArgs) {
172169
pub struct VersionInfo {
173170
/// The version of the application.
174171
pub version: &'static str,
175-
/// The build timestamp of the application.
176-
pub build_timestamp: &'static str,
177172
/// The cargo features enabled for the build.
178173
pub cargo_features: &'static str,
179174
/// The Git SHA of the build.
@@ -187,9 +182,8 @@ pub struct VersionInfo {
187182
impl VersionInfo {
188183
/// This exposes reth's version information over prometheus.
189184
pub fn register_version_metrics(&self) {
190-
let labels: [(&str, &str); 6] = [
185+
let labels: [(&str, &str); 5] = [
191186
("version", self.version),
192-
("build_timestamp", self.build_timestamp),
193187
("cargo_features", self.cargo_features),
194188
("git_sha", self.git_sha),
195189
("target_triple", self.target_triple),

0 commit comments

Comments
 (0)