From 3cf7a818d12f396f2ec66e65a792b1d629e69fa2 Mon Sep 17 00:00:00 2001 From: hlsxx <82389799+hlsxx@users.noreply.github.com> Date: Fri, 20 Mar 2026 01:35:21 +0100 Subject: [PATCH] feat: build.rs version message (#2839) * feat: build.rs version message * doc: changelog --------- Co-authored-by: extrawurst <776816+extrawurst@users.noreply.github.com> --- CHANGELOG.md | 4 ++++ build.rs | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9ccb915..029a814d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased ### Changed +<<<<<<< feat/version-message +* improve `gitui --version` message [[@hlsxx](https://github.com/hlsxx)] ([#2838](https://github.com/gitui-org/gitui/issues/2838)) +======= * rust msrv bumped to `1.88` ### Fixed * fix panic when renaming or updating remote URL with no remotes configured [[@xvchris](https://github.com/xvchris)] ([#2868](https://github.com/gitui-org/gitui/issues/2868)) +>>>>>>> master ## [0.28.0] - 2025-12-14 diff --git a/build.rs b/build.rs index 382490cf..c421e47d 100644 --- a/build.rs +++ b/build.rs @@ -34,14 +34,14 @@ fn main() { let build_date = now.date_naive(); let build_name = if std::env::var("GITUI_RELEASE").is_ok() { + env!("CARGO_PKG_VERSION").to_string() + } else { format!( - "{} {} ({})", + "{}-nightly {} ({})", env!("CARGO_PKG_VERSION"), build_date, get_git_hash() ) - } else { - format!("nightly {} ({})", build_date, get_git_hash()) }; println!("cargo:warning=buildname '{build_name}'");