Skip to content

feat: update --version output to include Go version and os/arch#107

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

feat: update --version output to include Go version and os/arch#107
JaredHatfield merged 1 commit into
mainfrom
copilot/update-version-command-format

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 23, 2026

Summary

Updates the --version flag output to match the standardized format:

yamltecture version vX.Y.Z (goX.Y, os/arch)

Changes

  • Added regexp, runtime, and strings imports to main.go
  • Added buildVersionOutput helper that normalizes the version string (adds v prefix to bare semver) and appends the Go runtime version plus OS/architecture
  • Updated the version print statement from fmt.Println("Version:", Version) to fmt.Printf("yamltecture version %s\n", buildVersionOutput(Version))
  • Added three unit tests for buildVersionOutput covering: bare semver input, already-prefixed v input, and non-semver (dev) input

Reference

Follows the same pattern as UnitVectorY-Labs/hallucinateapi#40.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.29%. Comparing base (f9524ba) to head (0d9914c).

Files with missing lines Patch % Lines
main.go 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
+ Coverage   77.17%   77.29%   +0.11%     
==========================================
  Files          14       14              
  Lines         999     1004       +5     
==========================================
+ Hits          771      776       +5     
  Misses        153      153              
  Partials       75       75              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JaredHatfield JaredHatfield merged commit 98f2c02 into main May 23, 2026
6 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