Semaphore/cli/cmd/version.go

21 lines
333 B
Go
Raw Normal View History

2021-08-25 22:12:19 +02:00
package cmd
import (
"fmt"
2021-08-25 22:12:19 +02:00
"github.com/ansible-semaphore/semaphore/util"
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
2021-08-27 10:50:26 +02:00
Short: "Print the version of Semaphore",
2021-08-25 22:12:19 +02:00
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(util.Version())
2021-08-25 22:12:19 +02:00
},
}