diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 715b7a9594d..d37d6c33dd4 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -14,7 +14,7 @@ builds: - amd64 - arm64 ldflags: - - -s -w -X github.com/truecharts/public/clustertool/cmd.version={{.Version}} # Adjust path if necessary + - -s -w -X github.com/truecharts/public/clustertool/main.version={{.Version}} # Adjust path if necessary archives: - name_template: "{{.ProjectName}}_{{ .Version }}_{{.Os}}_{{.Arch}}" checksum: diff --git a/clustertool/main.go b/clustertool/main.go index d3574881e6d..f823185e135 100644 --- a/clustertool/main.go +++ b/clustertool/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "os" "time" @@ -16,6 +17,8 @@ import ( ctrllogzap "sigs.k8s.io/controller-runtime/pkg/log/zap" ) +var version = "dev" + func main() { // Configure zerolog zerolog.DurationFieldUnit = time.Second @@ -68,6 +71,8 @@ func main() { // Set controller-runtime logger to use zap ctrlLogger := ctrllogzap.New(ctrllogzap.UseDevMode(true), ctrllogzap.Level(zapLevel)) ctrllog.SetLogger(ctrlLogger) + fmt.Printf("\n%s\n", helper.Logo) + fmt.Printf("---\nClustertool Version: %s\n---\n", version) embed.AllToCache() diff --git a/clustertool/pkg/helper/vars.go b/clustertool/pkg/helper/vars.go index 9978aad07e4..231a5dc5b3b 100644 --- a/clustertool/pkg/helper/vars.go +++ b/clustertool/pkg/helper/vars.go @@ -31,4 +31,17 @@ var ( IndexCache = "./index_cache" GpgDir = ".cr-gpg" // Adjust the path based on your project structure + Logo = ` + _______ _____ _ _ + |__ __| / ____| | | | + | |_ __ _ _ ___| | | |__ __ _ _ __| |_ ___ + | | '__| | | |/ _ \ | | '_ \ / _` + "`" + ` | '__| __/ __| + | | | | |_| | __/ |____| | | | (_| | | | |_\__ \ + |_|_| \__,_|\___|\_____|_| |_|\__,_|_| \__|___/ + _______ __ ______ __ + / ___/ /_ _____ / /____ ___/_ __/__ ___ / / + / /__/ / // (_-