Makefile: Add EXTRA_VERSION

Add this new make variable so users can specify build information
without modifying the runc version nor the source code.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
This commit is contained in:
Rodrigo Campos
2024-08-14 12:46:54 +02:00
parent f4cc3d8313
commit cc2078ccdd
2 changed files with 13 additions and 1 deletions
+2 -1
View File
@@ -18,7 +18,8 @@ BUILDTAGS ?= seccomp urfave_cli_no_docs
BUILDTAGS += $(EXTRA_BUILDTAGS)
COMMIT ?= $(shell git describe --dirty --long --always)
VERSION := $(shell cat ./VERSION)
EXTRA_VERSION :=
VERSION := $(shell cat ./VERSION)$(EXTRA_VERSION)
LDFLAGS_COMMON := -X main.gitCommit=$(COMMIT) -X main.version=$(VERSION)
GOARCH := $(shell $(GO) env GOARCH)