feat(cli): add version diagnostics and build-aware start

This commit is contained in:
2026-08-15 23:35:55 +02:00
parent 9a8755e4c3
commit 7ac99b4f7e
11 changed files with 989 additions and 306 deletions
+17
View File
@@ -0,0 +1,17 @@
package version
import (
"runtime"
"testing"
)
// Catches a source build that reports no usable identity or the wrong host platform.
func TestCurrentReportsUsableSourceBuildIdentity(t *testing.T) {
info := Current()
if info.Version == "" || info.Commit == "" || info.BuildTime == "" {
t.Fatalf("Current() = %#v, want non-empty build identity", info)
}
if info.OS != runtime.GOOS || info.Arch != runtime.GOARCH {
t.Fatalf("Current() platform = %s/%s, want %s/%s", info.OS, info.Arch, runtime.GOOS, runtime.GOARCH)
}
}