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.
pull/238/head
marco 2024-02-05 17:03:26 +01:00 zatwierdzone przez silseva
rodzic 69c0bc484c
commit 31d9b909f7
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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)

Wyświetl plik

@ -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