From 1d9a9acb1c5b3e68396e7bf17921fb27e592c12d Mon Sep 17 00:00:00 2001 From: Ttibsi Date: Tue, 26 May 2026 16:02:20 +0000 Subject: [PATCH 1/2] Set default unknown version if no git hash/tag can be found --- cmake/version.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/version.cmake b/cmake/version.cmake index 8e6f2144..f3041034 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -13,7 +13,11 @@ function(version_setup) OUTPUT_STRIP_TRAILING_WHITESPACE ) - set(GIT_VERSION "${GIT_TAG} (${GIT_HASH})") + if(NOT GIT_TAG OR NOT GIT_HASH) + set(GIT_VERSION "Unknown") + else() + set(GIT_VERSION "${GIT_TAG} (${GIT_HASH})") + endif() string(TIMESTAMP COMPILE_DATE "%Y/%m/%d") if(CMAKE_BUILD_TYPE STREQUAL "") From 67d11513dd882ae04cf74afbb34123a49f38bc3e Mon Sep 17 00:00:00 2001 From: Ttibsi Date: Tue, 26 May 2026 16:02:58 +0000 Subject: [PATCH 2/2] update readme --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0681f214..a4236d57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Disabled continuous deployment in GHA. See `.github/workflows/build_artifact.yml` for details * `M` now marks the current row to the given letter on the keyboard +* `--version` now states `Unknown` if the git tag/hash cannot be found * Resolve crash when user tries to switch top or bottom line outside of scope * Resolved crash when the user tries to `delete word` past the end of a line