-
Notifications
You must be signed in to change notification settings - Fork 82
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
feat(Build, workflow): Add Version Info Files #937
feat(Build, workflow): Add Version Info Files #937
Conversation
chore(Other): Stage Feb 2024 Release
chore(Other): Stage Feb 2024 Release
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.
Nice new feature. Just minor copyright updates.
What happens in the case of working off the master branch for example versus a release? Will the new constants be loaded with the latest release, empty, or another unknown value? |
@BrentK-ADI I just added some minor Makefile black magic to check whether you're working off the git repo, and if you've got a valid python installation. If those conditions are met, the version info files will be updated every time you run a build. (f7d335c) If you're exactly on a release tag, you should see your version info match the tag exactly. If you're on a development branch, you'll get a modified version string with the following format: I'm not sure if this is too annoying for every day development, since the version info files will always show as changed and you should be adding them into all your commits from here on out. Open to feedback here. |
This reverts commit f1d7a10.
Pull Request Template
Description
This PR adds a
mxc_version.h
info file with the following definitions that can be used by application code to check against a specific release of the MSDK.MSDK_VERSION_STRING
MSDK_VERSION_YEAR
MSDK_VERSION_MONTH
It also merges the release branch back into main, so that main can see the latest release tag.
The definitions are generated by a Python script. It uses
git describe --tags
to get an info string in relation to the latest tag.It also generates a version info file for the build system.
The result is that the build output will now print:
and application code can include the version info file.
Workflow
A workflow has also been added that will update newly created tags on the release branch with the latest version info files.
I am not triggering the workflow to run automatically on any branches, because that would generate a lot of upstream commits. In the future, I will set up another workflow to trigger on approved PRs
Checklist Before Requesting Review