From 02f27943c7a72e94f28b7829d08d2f5e4dac2d95 Mon Sep 17 00:00:00 2001 From: salmonik Date: Fri, 31 Jul 2026 02:43:06 +0200 Subject: auto-version all strings from Cargo.toml via env!("CARGO_PKG_VERSION") --- src/shell.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/shell.rs b/src/shell.rs index 2f8b8f7..8e4cb62 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -7,8 +7,8 @@ const LINE_BUF_SIZE: usize = 256; /// Run the shell forever. pub fn run() -> ! { - gop_println!("raisernics v0.2 — type 'help' for commands"); - serial_println!("========== raisernics v0.2 =========="); + gop_println!("raisernics v{} — type 'help' for commands", env!("CARGO_PKG_VERSION")); + serial_println!("========== raisernics v{} ==========", env!("CARGO_PKG_VERSION")); loop { // Print prompt @@ -125,7 +125,8 @@ fn cmd_clear() { fn cmd_info() { // Test that the global allocator works: build a String on the heap - let mut s = alloc::string::String::from("raisernics v0.2"); + let mut s = alloc::string::String::from("raisernics v"); + s.push_str(env!("CARGO_PKG_VERSION")); s.push_str(" — RNG custom kernel"); gop_println!("{}", s); gop_println!("arch: x86_64, freestanding, no userspace"); -- cgit v1.2.3