Makefile: allow REVISION be overwritten by environment

Required for distros that wanna use their local version and
can't have some (possibly failing) git commands being run here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2023-08-07 16:56:11 +02:00
parent 2b2195c36b
commit 965641dbc1

View File

@ -31,7 +31,7 @@ TEST_IMAGE_LIST ?=
# Used to populate variables in version package. # Used to populate variables in version package.
VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always) VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi) REVISION ?= $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
PACKAGE=github.com/containerd/containerd PACKAGE=github.com/containerd/containerd
SHIM_CGO_ENABLED ?= 0 SHIM_CGO_ENABLED ?= 0