mirror of
https://github.com/mudler/luet.git
synced 2025-07-18 09:21:13 +00:00
Add version to CLI and write commit sha to release build
This commit is contained in:
parent
8ed2badefc
commit
a806937941
4
Makefile
4
Makefile
@ -1,8 +1,8 @@
|
|||||||
NAME ?= luet
|
NAME ?= luet
|
||||||
PACKAGE_NAME ?= $(NAME)
|
PACKAGE_NAME ?= $(NAME)
|
||||||
PACKAGE_CONFLICT ?= $(PACKAGE_NAME)-beta
|
PACKAGE_CONFLICT ?= $(PACKAGE_NAME)-beta
|
||||||
REVISION := $(shell git rev-parse --short HEAD || echo unknown)
|
REVISION := $(shell git rev-parse --short HEAD || echo dev)
|
||||||
VERSION := $(shell git describe --tags || echo dev)
|
VERSION := $(shell git describe --tags || echo $(REVISION))
|
||||||
VERSION := $(shell echo $(VERSION) | sed -e 's/^v//g')
|
VERSION := $(shell echo $(VERSION) | sed -e 's/^v//g')
|
||||||
ITTERATION := $(shell date +%s)
|
ITTERATION := $(shell date +%s)
|
||||||
BUILD_PLATFORMS ?= -osarch="linux/amd64" -osarch="linux/386" -osarch="linux/arm"
|
BUILD_PLATFORMS ?= -osarch="linux/amd64" -osarch="linux/386" -osarch="linux/arm"
|
||||||
|
@ -29,11 +29,14 @@ import (
|
|||||||
var cfgFile string
|
var cfgFile string
|
||||||
var Verbose bool
|
var Verbose bool
|
||||||
|
|
||||||
|
const LuetCLIVersion = "0.1-dev"
|
||||||
|
|
||||||
// RootCmd represents the base command when called without any subcommands
|
// RootCmd represents the base command when called without any subcommands
|
||||||
var RootCmd = &cobra.Command{
|
var RootCmd = &cobra.Command{
|
||||||
Use: "luet",
|
Use: "luet",
|
||||||
Short: "Package manager for the XXth century!",
|
Short: "Package manager for the XXth century!",
|
||||||
Long: `Package manager which supports Gentoo and Entropy packages`,
|
Long: `Package manager which supports Gentoo and Entropy packages`,
|
||||||
|
Version: LuetCLIVersion,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute adds all child commands to the root command sets flags appropriately.
|
// Execute adds all child commands to the root command sets flags appropriately.
|
||||||
|
Loading…
Reference in New Issue
Block a user