]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: version: add -vq, -vqb, and -vqs flags for concise version output
authorNikita Kurashkin <nkurashkin@stsoft.ru>
Tue, 2 Sep 2025 09:34:51 +0000 (11:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 5 Sep 2025 06:57:57 +0000 (08:57 +0200)
commitef73fe258460915daa44e7bdf8de754d0377adcc
tree9bcb1d7964ab486e8a03c2a9c697805261003ec3
parent5d9abc68b43088ecb6b49d54f69e98cace042186
MINOR: version: add -vq, -vqb, and -vqs flags for concise version output

This patch introduces three new command line flags to display HAProxy version
info more flexibly:

- `-vqs` outputs the short version string without commit info (e.g., "3.3.1").
- `-vqb` outputs only the branch (major.minor) part of the version (e.g., "3.3").
- `-vq` outputs the full version string with suffixes (e.g., "3.3.1-dev5-1bb975-71").

This allows easier parsing of version info in automation while keeping existing -v and -vv behaviors.

The command line argument parsing now calls `display_version_plain()` with a
display_mode parameter to select the desired output format. The function handles
stripping of commit or patch info as needed, depending on the mode.

Signed-off-by: Nikita Kurashkin <nkurashkin@stsoft.ru>
src/haproxy.c