Skip to content
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

Add CMake Versioning Module #15

Merged
merged 12 commits into from Dec 16, 2020
Merged

Add CMake Versioning Module #15

merged 12 commits into from Dec 16, 2020

Conversation

matthewpaul
Copy link
Contributor

With this commit, I have added automated versioning support via CMake that will provide Semantic Versioning for the Device Client executable. I have also included instructions for how to tag elements of this package's repository with version information that will automatically get built into the executable for debugging and tracking purposes.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
Matt added 7 commits December 14, 2020 12:24
With this commit, I have added automated versioning support via CMake that will provide Semantic Versioning for the Device Client executable. I have also included instructions for how to tag elements of this package's repository with version information that will automatically get built into the executable for debugging and tracking purposes.
With this commit, I added a bit to the git version tag glob so that we try to at least match numbers rather than just anything starting with a v. Also fixed a merge issue that was running the same src glob twice.
Fixing some files that are causing the linter to fail
Attempting to modify our ci.yml file to make github actions pull the tag information when checking out the current branch.
Added the command to pull all tags for all workflow steps.
Fixed an issue with the fetch-depth that was improperly formatted.
Github actions was unable to parse my updated ci.yml file due to some indentation issues.
Matt and others added 4 commits December 14, 2020 12:29
Formatting was done in the wrong direction on last commit
Fix formatting for ci.yml
Attempting to help github actions resolve versioning issue
.version Show resolved Hide resolved
Comment on lines +187 to +192
LOGM_INFO(
TAG,
"Now running AWS IoT Device Client version v%d.%d.%d",
DEVICE_CLIENT_VERSION_MAJOR,
DEVICE_CLIENT_VERSION_MINOR,
DEVICE_CLIENT_VERSION_PATCH);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably outside the scope of this PR. But we could add a Cli option such as --version. The Cli parsing logic can take a lambda and you can send this information to cout just like how we print --help.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a really good idea! I can add it in a follow up CR

Copy link
Contributor

@fufranci fufranci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matthewpaul matthewpaul merged commit bb746a4 into main Dec 16, 2020
@matthewpaul matthewpaul deleted the semanticVersioning branch December 16, 2020 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants