-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refine CMake version handling based on tags #4381
Conversation
|
a185956
to
2b5e2dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix a download zip without a git clone we need to fix the CMake Error: Cannot parse SOURCE_DATE_EPOCH as **integer**
error
git_head_commit_timestamp(timestamp)
set(ERRORS "GIT-NOTFOUND" "HEAD-FORMAT-NOTFOUND" "HEAD-HASH-NOTFOUND")
if(timestamp IN_LIST ERRORS)
# git not availibe, set fallback values
set(timestamp 1456063320)
endif()
set(PROJECT_VERSION_TIMESTAMP
-Add git as a runner tool for versioning
A lot of the hex files info is still based on configuration.h, even if git & tag is available. configuration.h:
git tag: The build info from cmake looks correct:
But the generated hex file doesn't only use the git & tag info, it's a mixed result. Filename: (uses configuration.h version) LCD ->Bootup Firmware Version: (uses configuration.h version) LCD ->Support: (uses git & tag info) |
Filenames are deliberately not yet supported due to further planned changes there. The leading v is an oversight as it's part of the tag and the bootup version is probably doing something silly/different or is not properly inheriting its #includes, because the CMake #defines have the same names as those they override in Configuration.h 🤔 |
Don't see anything obvious on the boot screen issue. It is using the same FW_VERSION macro every other place does that doesn't include the commit number 🤷 |
Sorry to be so annoying! 😄 |
That's what I get for coding at late hours 😛 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing some minor issues in next PR
ENFORCE_VERSION_MATCH
to cause a failure if Configuration.h and the git tag do not match. Default: OffNO_TAG_IS_FATAL
to cause an error if no git tag could be properly parsed Default: Off