Skip to content

feat: tmpo [-v | --version | version] Command#11

Merged
DylanDevelops merged 1 commit into
mainfrom
ravel/version-command
Dec 16, 2025
Merged

feat: tmpo [-v | --version | version] Command#11
DylanDevelops merged 1 commit into
mainfrom
ravel/version-command

Conversation

@DylanDevelops
Copy link
Copy Markdown
Owner

This pull request refactors how version information is displayed and introduces a dedicated version subcommand. The main improvements are the extraction of version formatting logic into reusable functions and the addition of a hidden version command for consistent version output.

Enhancements to version information handling:

  • Added a new version subcommand in cmd/version.go that displays version details, including the build date and a changelog URL. This command is hidden but can be invoked directly.
  • Extracted version string formatting into the new GetVersionOutput, GetFormattedDate, and GetChangelogUrl helper functions in cmd/version.go for reuse by both the CLI flags and the new subcommand.
  • Updated the root command's version template in cmd/root.go to use the new GetVersionOutput function, ensuring consistent version output across the application.

Code cleanup:

  • Removed the unused fmt import from cmd/root.go.

Introduces a new hidden 'version' subcommand in cmd/version.go, centralizes version output formatting in GetVersionOutput, and updates root command to use this function. This improves maintainability and consistency of version information display.
@DylanDevelops DylanDevelops changed the title feat: tmpo [-v | --version | version Command feat: tmpo [-v | --version | version] Command Dec 16, 2025
@DylanDevelops DylanDevelops merged commit c485b4b into main Dec 16, 2025
3 checks passed
@DylanDevelops DylanDevelops deleted the ravel/version-command branch December 16, 2025 01:58
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.

1 participant