Add NIRI_BUILD_VERSION_STRING env variable to override the version
Browse files at this commit8be8694f5f62716ffa8fd680d7992c087f780174Parent: 60b78dc1 changed file +4 -0
- src/utils/mod.rs +4 -0
src/utils/mod.rsmodified+4 -0
| @@ -79,6 +79,10 @@ impl ResizeEdge { | |||
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | pub fn version() -> String { | 81 | pub fn version() -> String { |
| 82 | + if let Some(v) = option_env!("NIRI_BUILD_VERSION_STRING") { | ||
| 83 | + return String::from(v); | ||
| 84 | + } | ||
| 85 | + | ||
| 82 | format!( | 86 | format!( |
| 83 | "{} ({})", | 87 | "{} ({})", |
| 84 | env!("CARGO_PKG_VERSION"), | 88 | env!("CARGO_PKG_VERSION"), |