This example shows the usage of the GitHashExtractor.
Execute make
in the example folder. Make sure to have python and g++ installed and ready.
Alternatively, you can run the script by yourself via python3 firmwareVersion.py
and compile the cpp file with the compiler of your choice.
The example file prints out some stats about your parent repo:
=========== version info ===========
Build date: 2022-06-06
GitHash: 0xc184746
GitTag: 0.9.3
Offset: 0
Prerelease: alpha.3
Unixtime: 1654546309