Skip to content

Commit

Permalink
🎨 Properly set version
Browse files Browse the repository at this point in the history
  • Loading branch information
wesen committed Feb 10, 2025
1 parent be18cf7 commit d32d5ab
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions cmd/go-go-mcp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,7 @@ import (

var (
// Version information
Version = "dev"
BuildTime = "unknown"
GitCommit = "none"

// Command flags
transport string
port int
debug bool
logLevel string
withCaller bool
version = "dev"
)

var rootCmd = &cobra.Command{
Expand All @@ -48,6 +39,7 @@ providing a framework for building MCP servers and clients.`,
err := clay.InitLogger()
cobra.CheckErr(err)
},
Version: version,
}

var runCommandCmd = &cobra.Command{
Expand Down Expand Up @@ -98,18 +90,6 @@ func initRootCmd() (*help.HelpSystem, error) {
bridgeCmd := server_cmds.NewBridgeCommand(log.Logger)
rootCmd.AddCommand(bridgeCmd)

// Add version command
versionCmd := &cobra.Command{
Use: "version",
Short: "Print version information",
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("mcp-server version %s\n", Version)
fmt.Printf(" Build time: %s\n", BuildTime)
fmt.Printf(" Git commit: %s\n", GitCommit)
},
}
rootCmd.AddCommand(versionCmd)

return helpSystem, nil
}

Expand Down

0 comments on commit d32d5ab

Please sign in to comment.