package version

import (
	"fmt"

	"github.com/pingcap/log"
	"go.uber.org/zap"
)

var (
	TEPReleaseVersion = "None"
	TEPGitHash        = "None"
	TEPGitBranch      = "None"
	TEPBuildTS        = "None"
)

func PrintVersionInfo() {
	fmt.Println("Release Version:", TEPReleaseVersion)
	fmt.Println("Git Commit Hash:", TEPGitHash)
	fmt.Println("Git Branch:", TEPGitBranch)
	fmt.Println("UTC Build Time:", TEPBuildTS)
}

func LogVersionInfo() {
	log.Info("Welcome to TiDB Enterprise Platform (TEP)")
	log.Info("TEP", zap.String("release_version", TEPReleaseVersion))
	log.Info("TEP", zap.String("git_hash", TEPGitHash))
	log.Info("TEP", zap.String("git_branch", TEPGitBranch))
	log.Info("TEP", zap.String("utc_build_time", TEPBuildTS))
}
