From 6770c8695aa5338a80552bc541e8070a8c43a643 Mon Sep 17 00:00:00 2001 From: Julien Durillon Date: Tue, 11 Jun 2019 13:15:00 +0200 Subject: [PATCH] Allow to define `COMMIT` by env Some package managers download the archive instead of cloning the git repo. When they do that, the call to git fails. This commit allows package managers to provide the COMMIT value via environment. Signed-off-by: Julien Durillon --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0f26a1c84..c60f82371 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ RUNC_IMAGE := runc_dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN)) PROJECT := github.com/opencontainers/runc BUILDTAGS ?= seccomp COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true) -COMMIT := $(if $(shell git status --porcelain --untracked-files=no),"${COMMIT_NO}-dirty","${COMMIT_NO}") +COMMIT ?= $(if $(shell git status --porcelain --untracked-files=no),"${COMMIT_NO}-dirty","${COMMIT_NO}") MAN_DIR := $(CURDIR)/man/man8 MAN_PAGES = $(shell ls $(MAN_DIR)/*.8)