Skip to content

feat: add support for printing tag version when tag-only option is used in inspect command - #197

Merged
saintedlama merged 1 commit into
mainfrom
feat/support-tag-only-in-inspect
Feb 22, 2026
Merged

feat: add support for printing tag version when tag-only option is used in inspect command#197
saintedlama merged 1 commit into
mainfrom
feat/support-tag-only-in-inspect

Conversation

@saintedlama

@saintedlama saintedlama commented Feb 15, 2026

Copy link
Copy Markdown
Collaborator

Not sure how useful this is, but it was super simple to implement with the given architecture.

Closes #128

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for printing the tag version when the --tag-only option is used with the inspect command, addressing issue #128. The implementation leverages the existing GetCurrentVersion() method in InspectCmdContext, which already contains the logic to choose between bump file version and tag version based on the SkipBumpFile option (which is set by --tag-only).

Changes:

  • Refactored InspectCommand to use modern C# primary constructor pattern
  • Updated inspect command to use GetCurrentVersion() method instead of directly accessing BumpFile.Version
  • Added test coverage for the tag-only scenario

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Versionize/Commands/InspectCommand.cs Refactored to use primary constructor and replaced direct BumpFile access with GetCurrentVersion() call, enabling tag-only support
Versionize.Tests/FunctionalTests/Program.InspectCommandTests.cs Added test to verify inspect command prints tag version when --tag-only flag is used

@saintedlama
saintedlama merged commit 237b906 into main Feb 22, 2026
9 checks passed
@saintedlama
saintedlama deleted the feat/support-tag-only-in-inspect branch February 22, 2026 09:31
This was referenced Aug 3, 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.

Versionize Inspect with TagOnly

3 participants