From deb58185870d9c66bf33132833e21ef7a3caadcd Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Sat, 13 May 2023 06:30:49 +0200 Subject: [PATCH] use compile-time year in `--version` copyright (#4946) Instead of using current runtime year, use compile-time year in notice. ``` nimbus_beacon_node --version ``` --- beacon_chain/version.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beacon_chain/version.nim b/beacon_chain/version.nim index 21354dce3..af87d5c62 100644 --- a/beacon_chain/version.nim +++ b/beacon_chain/version.nim @@ -11,11 +11,11 @@ import std/[strutils, compilesettings] -when not defined(nimscript): - import times - let copyrights* = "Copyright (c) 2019-" & $(now().utc.year) & " Status Research & Development GmbH" - const + compileYear = CompileDate[0 ..< 4] # YYYY-MM-DD (UTC) + copyrights* = + "Copyright (c) 2019-" & compileYear & " Status Research & Development GmbH" + versionMajor* = 23 versionMinor* = 5 versionBuild* = 0