Skip to content

feat: add version command and improve --version output#67

Merged
mathieu-benoit merged 1 commit into
mainfrom
copilot/adapt-feature-from-score-compose
Apr 16, 2026
Merged

feat: add version command and improve --version output#67
mathieu-benoit merged 1 commit into
mainfrom
copilot/adapt-feature-from-score-compose

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

Adapts the feature from score-compose#467 to score-radius: improves --version output and adds a new version subcommand.

Changes

  • internal/version/version.go: Drop debug.ReadBuildInfo in favour of build-time ldflags; add GitCommit and BuildDate vars. New format:
    score-radius 0.1.0 (go1.26.2 - linux/amd64)
    git commit: abc123def
    build date: 2026-04-16T00:00:00Z
    
  • internal/command/root.go: Introduce ScoreImplementationName constant; set a custom cobra version template (removes the default version word from output).
  • internal/command/version.go: New score-radius version subcommand — prints Score ASCII logo, version info, and checks GitHub releases for a newer version. Flags: --no-logo, --no-updates-check.
  • .goreleaser.yaml: Inject GitCommit and BuildDate via ldflags at release build time.
  • Dockerfile: Accept GIT_COMMIT/BUILD_DATE build ARGs and pass them as ldflags so container image builds report accurate metadata (previously showed build: local, sha: unknown).
  • .github/workflows/release.yaml: Forward GIT_COMMIT and BUILD_DATE as Docker build-args.
  • root_test.go: Add TestRootVersion asserting the new output format.

Agent-Logs-Url: https://github.com/score-spec/score-radius/sessions/25c2e4ad-1642-4fd7-a47c-f7639b7a6c41

Co-authored-by: mathieu-benoit <11720844+mathieu-benoit@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 16, 2026

Overview

Image reference score-radius:latest score-radius:latest
- digest 4a25b647910f 80ddc1796b7d
- tag latest latest
- provenance ec5e0f2 ae3ef98
- vulnerabilities critical: 0 high: 0 medium: 0 low: 0 critical: 0 high: 0 medium: 0 low: 0
- platform linux/amd64 linux/amd64
- size 5.4 MB 5.4 MB (-3.7 kB)
- packages 40 40
Policies (0 improved, 0 worsened)
Policy Name score-radius:latest score-radius:latest Change Standing
Default non-root user No Change
No AGPL v3 licenses No Change
No fixable critical or high vulnerabilities No Change
No high-profile vulnerabilities No Change
No outdated base images No Change
No unapproved base images No Change
Supply chain attestations No Change
Valid Docker Hardened Image (DHI) or DHI base image ⚠️ 2 ⚠️ 2 No Change
Packages and Vulnerabilities (1 package changes and 0 vulnerability changes)
  • ♾️ 1 packages changed
  • 39 packages unchanged
Changes for packages of type golang (1 changes)
Package Version
score-radius:latest
Version
score-radius:latest
♾️ github.com/score-spec/score-radius 0.0.0-20260412231134-ec5e0f27c33f+dirty 0.0.12-0.20260416012536-ae3ef98ad1ab+dirty

@mathieu-benoit mathieu-benoit self-requested a review April 16, 2026 02:00
Copy link
Copy Markdown
Contributor

@mathieu-benoit mathieu-benoit left a comment

Choose a reason for hiding this comment

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

LGTM

@mathieu-benoit mathieu-benoit merged commit 7cf6a8b into main Apr 16, 2026
37 of 40 checks passed
@mathieu-benoit mathieu-benoit deleted the copilot/adapt-feature-from-score-compose branch April 16, 2026 02:04
@mathieu-benoit
Copy link
Copy Markdown
Contributor

FYI: docs now updated #73

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.

2 participants