fix: update version command to use constants for version and build time

This commit is contained in:
Chang lue Tsen 2025-04-25 15:07:22 +09:00
parent 9fcc65f1f9
commit 1fb7be5d61
2 changed files with 2 additions and 7 deletions

View File

@ -2,8 +2,8 @@ package cmd
import (
"fmt"
"github.com/perfect-panel/server/pkg/constant"
"github.com/perfect-panel/ppanel-server/internal/config"
"github.com/spf13/cobra"
)
@ -11,6 +11,6 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "PPanel version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("[PPanel version] " + config.Version)
fmt.Println("[PPanel version] " + constant.Version + " (" + constant.BuildTime + ")")
},
}

View File

@ -1,5 +0,0 @@
package config
import "github.com/perfect-panel/ppanel-server/pkg/constant"
const Version = constant.Version