Skip to content

#defines for git info #6897

Closed
Closed
@bmcdonnell-ionx

Description

@bmcdonnell-ionx

Description

This feature was requested several years ago on the Mbed forum.

It would be useful to be able to access project Git hash / commit metadata from source code, probably as #defines, e.g. to output to console.

Example: https://stackoverflow.com/a/12368262

The primary thing to have is the commit hash. "Dirty" bool and tags would be nice to have. NB: I'm requesting metadata for the project, not for Mbed OS.

Hopefully you could make it work for Mbed CLI and exported projects.

Issue request type

[ ] Question
[X] Enhancement
[ ] Bug

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions