mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
b4e570358e
* build: include major in go.mod module directive * fix: xflags * revert: cobra changes * fix: mock doc
30 lines
636 B
Go
30 lines
636 B
Go
package commands
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/authelia/authelia/v4/internal/utils"
|
|
)
|
|
|
|
func newBuildInfoCmd() (cmd *cobra.Command) {
|
|
cmd = &cobra.Command{
|
|
Use: "build-info",
|
|
Short: "Show the build information of Authelia",
|
|
Long: buildLong,
|
|
RunE: cmdBuildInfoRunE,
|
|
Args: cobra.NoArgs,
|
|
}
|
|
|
|
return cmd
|
|
}
|
|
|
|
func cmdBuildInfoRunE(_ *cobra.Command, _ []string) (err error) {
|
|
_, err = fmt.Printf(fmtAutheliaBuild, utils.BuildTag, utils.BuildState, utils.BuildBranch, utils.BuildCommit,
|
|
utils.BuildNumber, runtime.GOOS, runtime.GOARCH, utils.BuildDate, utils.BuildExtra)
|
|
|
|
return err
|
|
}
|