diff --git a/Makefile b/Makefile index 4a1ca772..6b37b668 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ NAME ?= luet PACKAGE_NAME ?= $(NAME) PACKAGE_CONFLICT ?= $(PACKAGE_NAME)-beta -REVISION := $(shell git rev-parse --short HEAD || echo unknown) -VERSION := $(shell git describe --tags || echo dev) +REVISION := $(shell git rev-parse --short HEAD || echo dev) +VERSION := $(shell git describe --tags || echo $(REVISION)) VERSION := $(shell echo $(VERSION) | sed -e 's/^v//g') ITTERATION := $(shell date +%s) BUILD_PLATFORMS ?= -osarch="linux/amd64" -osarch="linux/386" -osarch="linux/arm" diff --git a/cmd/root.go b/cmd/root.go index 0ae9ee2d..ae577525 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -29,11 +29,14 @@ import ( var cfgFile string var Verbose bool +const LuetCLIVersion = "0.1-dev" + // RootCmd represents the base command when called without any subcommands var RootCmd = &cobra.Command{ - Use: "luet", - Short: "Package manager for the XXth century!", - Long: `Package manager which supports Gentoo and Entropy packages`, + Use: "luet", + Short: "Package manager for the XXth century!", + Long: `Package manager which supports Gentoo and Entropy packages`, + Version: LuetCLIVersion, } // Execute adds all child commands to the root command sets flags appropriately.