mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-12-24 11:51:13 +08:00
feat: cmd version use short commitid (#291)
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,5 +1,5 @@
|
||||
VERSION ?= $(shell git tag -l --sort=v:refname | tail -1)
|
||||
GIT_COMMIT ?= $(shell git describe --match=NeVeRmAtCh --always --abbrev=40)
|
||||
GIT_COMMIT ?= $(shell git describe --match=NeVeRmAtCh --always --abbrev=7)
|
||||
BUILD_TIME ?= $(shell date +"%Y-%m-%dT%H:%M:%SZ")
|
||||
BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ func CmdVersion(cmdutil.Factory) *cobra.Command {
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Printf("KubeVPN: CLI\n")
|
||||
fmt.Printf(" Version: %s\n", config.Version)
|
||||
fmt.Printf(" DaemonVersion: %s\n", getDaemonVersion())
|
||||
fmt.Printf(" Daemon: %s\n", getDaemonVersion())
|
||||
fmt.Printf(" Image: %s\n", config.Image)
|
||||
fmt.Printf(" Branch: %s\n", Branch)
|
||||
fmt.Printf(" Git commit: %s\n", config.GitCommit)
|
||||
|
||||
Reference in New Issue
Block a user