cmd: add a 'version' subcommand and flag to show the version
Some checks failed
CI / build-docker (push) Successful in 4s
CI / build-docker-bootstrap (push) Has been skipped
CI / release-test (push) Failing after 13s

This commit is contained in:
2026-09-19 21:36:31 -07:00
parent 741709623b
commit 171da4139b
4 changed files with 88 additions and 1 deletions

19
cmd/subcmd_version.go Normal file
View File

@@ -0,0 +1,19 @@
package main
import (
"fmt"
"github.com/spf13/cobra"
"git.offline-twitter.com/offline-labs/gas-stack/pkg/version"
)
var cmd_version = &cobra.Command{
Use: "version",
Short: "Print the version of `gas`",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(version.String())
},
}