mirror of https://github.com/thesofproject/sof.git
version.cmake: --no-abbrev-commit cause github has allowAnySHA1InWant
Some git servers like Github allow fetching by full length SHA so this useful information to share. (Others forbid this entirely, see last page of `git help fetch-pack`) Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
23d2a01777
commit
d722ee15b1
|
@ -24,14 +24,17 @@ string(TIMESTAMP build_start_time UTC)
|
|||
message(STATUS "SOF version.cmake starting at ${build_start_time} UTC")
|
||||
|
||||
# Most CI engines test a temporary merge of the pull request with a
|
||||
# moving target: the latest target branch. In that case the SHA version
|
||||
# gathered by git describe is disposable hence useless. Only the
|
||||
# --parents SHA are useful.
|
||||
# moving target: the latest target branch. In that case the HEAD SHA is
|
||||
# very volatile and the --parents are much more relevant and useful.
|
||||
#
|
||||
# --no-abbrev-commit because some git servers like github allow fetching
|
||||
# by full length SHA (others forbid this entirely, see last page of
|
||||
# `git help fetch-pack`)
|
||||
message(STATUS "Building SOF git commit with parent(s):")
|
||||
# Note execute_process() failures are ignored by default (missing git...)
|
||||
execute_process(
|
||||
COMMAND git -C "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
log --parents --oneline --decorate -n 1 HEAD
|
||||
log --parents --no-abbrev-commit --decorate -n 1 HEAD
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue