Skip to content

Standardize --version output to include Go runtime and target platform#78

Merged
JaredHatfield merged 2 commits into
mainfrom
copilot/update-version-command-format
May 23, 2026
Merged

Standardize --version output to include Go runtime and target platform#78
JaredHatfield merged 2 commits into
mainfrom
copilot/update-version-command-format

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 23, 2026

This updates --version to emit a single standardized string: projectName version vX.Y.Z (goX.Y, os/arch). The current output omitted compiler/runtime and platform details, which are now included for consistent release/runtime identification.

  • Version output contract

    • Switched from Version: <value> to a canonical format:
      • clip4llm version <normalized-version> (<go-version>, <goos>/<goarch>)
    • Ensures the v prefix is present in version output when missing.
  • Implementation

    • Added a small formatter helper (formatVersionOutput) and routed --version through it.
    • Uses runtime metadata from Go stdlib (runtime.Version(), runtime.GOOS, runtime.GOARCH).
  • Coverage

    • Added focused unit tests for:
      • version normalization (1.2.3 -> v1.2.3)
      • preserving already-prefixed versions (v2.3.4).
func formatVersionOutput(projectName, version string) string {
	if version != "" && !strings.HasPrefix(version, "v") {
		version = "v" + version
	}
	return fmt.Sprintf("%s version %s (%s, %s/%s)",
		projectName, version, runtime.Version(), runtime.GOOS, runtime.GOARCH)
}

Copilot AI changed the title Standardize --version output format with Go and platform details Standardize --version output to include Go runtime and target platform May 23, 2026
Copilot AI requested a review from JaredHatfield May 23, 2026 21:52
@JaredHatfield JaredHatfield marked this pull request as ready for review May 23, 2026 22:38
@JaredHatfield JaredHatfield merged commit 0df76e8 into main May 23, 2026
4 checks passed
@JaredHatfield JaredHatfield deleted the copilot/update-version-command-format branch May 23, 2026 23:22
@github-project-automation github-project-automation Bot moved this from Todo to Done in UnitVectorY Labs May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants