Skip to content

Add -V, --version option - #121

Merged
landerweit-phytec merged 3 commits into
mainfrom
wip-version-option
Oct 12, 2026
Merged

landerweit-phytec merged 3 commits into
mainfrom
wip-version-option

Conversation

@mschwan-phytec

Copy link
Copy Markdown
Collaborator

Add a new --version/-V option to output the program version. This is the more common way of printing the program version, at least in the GNU world, instead of using a command. Deprecate the command and keep it for compatibility for now.

Add the global option -V, --version for printing the program version.
The command "partup version" is now deprecated and prints a warning when
used. It will be removed in a future release.

To allow running partup without a command, only with global options,
make the command parser accept -V and --version without a command and
stop parsing after the global options in that case.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Document the new global -V, --version option and mark the version
command as deprecated. Add a release section 5.0.0 to the changelog.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Add a unit test that checks that global options like -V and --version
are parsed successfully, even if no command is given.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
@mschwan-phytec mschwan-phytec changed the title Wip version option Add -V, --version option Oct 6, 2026
@landerweit-phytec
landerweit-phytec merged commit a9face9 into main Oct 12, 2026
4 checks passed
@landerweit-phytec
landerweit-phytec deleted the wip-version-option branch October 12, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants