fix: update version command to use constants for version and build time
This commit is contained in:
parent
da4fd72105
commit
52063049c5
@ -2,8 +2,8 @@ package cmd
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/perfect-panel/server/pkg/constant"
|
||||||
|
|
||||||
"github.com/perfect-panel/ppanel-server/internal/config"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -11,6 +11,6 @@ var versionCmd = &cobra.Command{
|
|||||||
Use: "version",
|
Use: "version",
|
||||||
Short: "PPanel version",
|
Short: "PPanel version",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
fmt.Println("[PPanel version] " + config.Version)
|
fmt.Println("[PPanel version] " + constant.Version + " (" + constant.BuildTime + ")")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
package config
|
|
||||||
|
|
||||||
import "github.com/perfect-panel/ppanel-server/pkg/constant"
|
|
||||||
|
|
||||||
const Version = constant.Version
|
|
||||||
Loading…
x
Reference in New Issue
Block a user