Skip to content

Commit

Permalink
feat(cmd): extend --version print info (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
piyoki authored Nov 15, 2023
1 parent 25c047a commit b7aea95
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package cmd

import (
"fmt"
"runtime"
"strings"

"github.com/daeuniverse/dae/config"
"github.com/spf13/cobra"
)
Expand All @@ -24,6 +28,12 @@ var (

func init() {
config.Version = Version
rootCmd.Version = strings.Join([]string{
Version,
fmt.Sprintf("go runtime %v %v/%v", runtime.Version(), runtime.GOOS, runtime.GOARCH),
"Copyright (c) 2023 dae",
"License GNU AGPLv3 <https://github.com/daeuniverse/dae/blob/main/LICENSE>",
}, "\n")
}

// Execute executes the root command.
Expand Down

0 comments on commit b7aea95

Please sign in to comment.