Skip to content

feat(cli): add --base option to vmn show (#150) - #173

Closed
UsmanGhias wants to merge 1 commit into
progovoy:masterfrom
UsmanGhias:feat/show-base-option-150
Closed

UsmanGhias wants to merge 1 commit into
progovoy:masterfrom
UsmanGhias:feat/show-base-option-150

Conversation

@UsmanGhias

Copy link
Copy Markdown

Resolves #150.

Overview

Adds the --base CLI option to vmn show <app> to print the base semver string without prerelease identifiers or build metadata (for example, 1.0.1-rc1 returns 1.0.1).

Changes

  • Added --base flag to add_arg_show in version_stamp/cli/args.py.
  • Passed base through handle_show in version_stamp/cli/commands.py.
  • In version_stamp/cli/output.py, calculated data["base_version"] using VMNBackend.get_base_vmn_version(verstr, vcs.hide_zero_hotfix). When --base is specified without --verbose, out returns the base version string. In --verbose mode, base_version is included in the output dictionary.
  • Added base keyword argument to _show in tests/helpers.py.
  • Added test coverage in tests/test_show.py (test_show_base_option) verifying base version extraction on release candidates and subsequent promotions.

Verification

Ran the full test suite in tests/test_show.py: all 13 tests pass.

Support retrieving the base version via --base flag in vmn show.
Extracts the base semver using VMNBackend.get_base_vmn_version,
stripping any prerelease or build metadata while respecting hide_zero_hotfix.
Includes unit tests in tests/test_show.py.
@UsmanGhias
UsmanGhias force-pushed the feat/show-base-option-150 branch from 22dbb65 to c57fcba Compare October 8, 2026 12:39
@progovoy

Copy link
Copy Markdown
Owner

There is a flag for this already

@UsmanGhias

Copy link
Copy Markdown
Author

Closing in favor of commit 0b877a4 on master. Thanks @progovoy!

@UsmanGhias UsmanGhias closed this Oct 19, 2026
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.

add --base option to vmn show

2 participants