Skip to content

Commit

Permalink
Get some build variables in
Browse files Browse the repository at this point in the history
  • Loading branch information
hilli committed Jun 25, 2023
1 parent 3476a0e commit 3d099ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/kefw2/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ THE SOFTWARE.
package cmd

import (
"fmt"
"os"
"path/filepath"

Expand All @@ -39,6 +40,7 @@ var (
defaultSpeaker *kefw2.KEFSpeaker
currentSpeaker *kefw2.KEFSpeaker
Version string
BuildDate string
)

// rootCmd represents the base command when called without any subcommands
Expand All @@ -55,7 +57,9 @@ var VersionCmd = &cobra.Command{
Use: "version",
Long: "Print the version number of kefw2",
Run: func(cmd *cobra.Command, args []string) {
log.Info("kefw2 version: ", Version)
fmt.Println("kefw2: Command line tool for controlling KEF's W2 platform speakers")
fmt.Println("Version: ", Version)
fmt.Println("Build date: ", BuildDate)
},
}

Expand Down

0 comments on commit 3d099ed

Please sign in to comment.