Skip to content

Commit ecf1597

Browse files
author
Hans Larsen
committed
fixup: version
1 parent bbbbdf0 commit ecf1597

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dfx/src/config/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ pub mod cache;
22
pub mod dfinity;
33

44
static mut DFX_VERSION: Option<String> = None;
5+
/// Returns the version of DFX that was built.
6+
/// In debug, add a timestamp of the upstream compilation at the end of version to ensure all
7+
/// debug runs are unique (and cached uniquely).
8+
/// That timestamp is taken from the DFX_TIMESTAMP_DEBUG_MODE_ONLY env var that is set in
9+
/// Nix.
510
pub fn dfx_version() -> &'static str {
611
unsafe {
712
match &DFX_VERSION {
@@ -11,8 +16,6 @@ pub fn dfx_version() -> &'static str {
1116

1217
#[cfg(debug_assertions)]
1318
{
14-
// In debug, add a timestamp of the compilation at the end of version to ensure all
15-
// debug runs are unique (and cached uniquely).
1619
DFX_VERSION = Some(format!(
1720
"{}-{}",
1821
version,

0 commit comments

Comments
 (0)