Documentation
¶
Overview ¶
Package cliversion cmd/skywire-cli/commands/version/root.go c4-vis-cli
`skywire cli version` reports the local build (version/commit/date) and, unless --local is given, resolves the latest available version and the rolling-release branch tip the SAME way the Go toolchain does when you run `go install github.com/skycoin/skywire/...@latest` from outside the source: via the Go module proxy protocol.
Resolution is authoritative through `go list -m -json <module>@<query>` (which honors GOPROXY + direct fallback, branch refs, tags, case-escaping — exactly Go's own logic) when the `go` toolchain is on PATH. With no `go` binary it falls back to a direct GOPROXY `@latest` HTTP query for the latest release (proxy.golang.org serves released tags but not arbitrary branch refs).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RootCmd = &cobra.Command{ Use: "version", Short: "Show the build version and check the latest available release/commit", Long: `Show the local build (version/commit/date) and, unless --local, resolve the latest available release and the rolling-release branch tip the way the Go toolchain resolves '@latest' — via the Go module proxy.`, DisableFlagsInUseLine: true, Run: func(cmd *cobra.Command, _ []string) { local := buildinfo.Get() out := &report{Local: local} if !localOnly { ctx, cancel := context.WithTimeout(cmd.Context(), timeout) defer cancel() out.resolve(ctx, modulePat, branch) } internal.PrintOutput(cmd.Flags(), out, out.human()) }, }
RootCmd is `skywire cli version`.
Functions ¶
This section is empty.
Types ¶
This section is empty.