diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2021-10-25 16:03:47 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2021-10-25 16:19:16 +0300 |
commit | dc3756194f7f315c216029c823083027a28f9560 (patch) | |
tree | 2a162f82dda5ab9fbc8f05660689ecbe0f184a72 | |
parent | 8e3a280d7c26d122d720eddc426cd166735c036e (diff) |
Accept `GIT_VERSION=` environment variable
In some environments it is impossible to unset
environment variable, and no `GIT_VERSION=` works.
This allows to pass empty value that indicates
that a default should be used. For example allowing
to execute: `make git GIT_VERSION=`.
Changelog: fixed
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -85,7 +85,7 @@ LIBGIT2_VERSION ?= v1.2.0 # Support both vX.Y.Z and X.Y.Z version patterns, since callers across # GitLab use both. -ifeq ($(origin GIT_VERSION),undefined) +ifeq (,$(GIT_VERSION)) GIT_VERSION := v2.33.1 else GIT_VERSION := $(shell echo ${GIT_VERSION} | awk '/^[0-9]\.[0-9]+\.[0-9]+$$/ { printf "v" } { print $$1 }') |