mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-06-02 09:46:34 +03:00
Use committer date for commit date and year
Quoting CMakeLists.txt: "[...] of latest commit" "Latest commit" is better served by using the committer date %cd instead of the author date %ad: The author date could be some time last year with committer date being today. Note this affects both autotools and cmake buildsystems to keep the generated version message dates and year in sync.
This commit is contained in:
@@ -69,14 +69,14 @@ if(Git_FOUND)
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND "${GIT_EXECUTABLE}" log -1 --format=%ad --date=format:%Y%m%d
|
||||
COMMAND "${GIT_EXECUTABLE}" log -1 --format=%cd --date=format:%Y%m%d
|
||||
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_COMMIT_DATE
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND "${GIT_EXECUTABLE}" log -1 --format=%ad --date=format:%Y
|
||||
COMMAND "${GIT_EXECUTABLE}" log -1 --format=%cd --date=format:%Y
|
||||
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_COMMIT_YEAR
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
|
||||
Reference in New Issue
Block a user