andymccall / ez80op

A command line utility that returns information on eZ80 opcodes.
0 stars 0 forks source link

Add git hash info to version output #12

Closed andymccall closed 2 months ago

andymccall commented 2 months ago

Enhancement: Add git hash info to version output

Details: The -v switch currently outputs the following:

ez80op/bin$ ./ez80op_linux_x86_64 -v
ez80op version 0.1, (C)2024 - Andy McCall

This should output something similar to:

ez80op/bin$ ./ez80op_linux_x86_64 -v
ez80op version 0.1-22abc6f, (C)2024 - Andy McCall

So a binary can be traced back to a specific build.

andymccall commented 2 months ago

Completed, but will need revisiting when a tag has been created to swap the hard coded version info over to the tag.

andymccall commented 2 months ago

This is causing a clang-tidy error in the action:

/home/runner/work/ez80op/ez80op/src/main.c:27:82: error: use of undeclared identifier 'GIT_INFO' [clang-diagnostic-error] printf("ez80op version %d.%d-%s, (C)2024 - Andy McCall\r\n",VERSION,REVISION,GIT_INFO);

GIT_INFO needs to be handled correctly.

andymccall commented 2 months ago

The action is now fixed.