i3 / i3status

Generates status bar to use with i3bar, dzen2 or xmobar
BSD 3-Clause "New" or "Revised" License
602 stars 254 forks source link

Fix version reporting in -h and -v. #450

Closed devkev closed 3 years ago

devkev commented 3 years ago

Since the conversion to autotools, i3status -h and i3status -v no longer report the "full" i3status version. Instead of reporting a string like 2.13-100-gf119d9b (2021-02-08, branch "testing"), it simply reports 2.13. This means that a patched or custom compiled version is indistinguishable from an actual release binary, which is obviously bad for diagnostics.

The cause is that in the old Makefile, -DVERSION was set to the contents of ${I3STATUS_VERSION}, whereas autotools sets the value of VERSION directly in config.h (to ${VERSION}, not ${I3STATUS_VERSION}).

Rather than try to change the VERSION macro back to the old format (which might break things that make assumptions about autotools' format of VERSION), I just updated the i3status -h and i3status -v code to directly use I3STATUS_VERSION instead of VERSION.