From 31d9b909f756f26eea1fd113b98e3bc583e95b61 Mon Sep 17 00:00:00 2001 From: marco <49691247+marcoSchr@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:03:26 +0100 Subject: [PATCH] Allow git commit as version At the moment the github action actifacts have no version listed on the info screen. We use the `--always` flag, as yhis allows `git describe` to show only the commit if nothing else is available. --- CMakeLists.txt | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 304223bf..779b0f06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,7 @@ set(OPENRTX_ROOT ${CMAKE_CURRENT_LIST_DIR}) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(openrtx) -execute_process(COMMAND git describe --tags --dirty +execute_process(COMMAND git describe --tags --dirty --always OUTPUT_VARIABLE GIT_VER_ID ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) diff --git a/meson.build b/meson.build index 20ddeb57..455e0115 100644 --- a/meson.build +++ b/meson.build @@ -138,7 +138,7 @@ subdir('lib/miosix-kernel') ## ## Current git commit or tag ## -r = run_command('git', 'describe', '--tags', '--dirty') +r = run_command('git', 'describe', '--tags', '--dirty', '--always') if r.returncode() != 0 # it failed endif