Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-08-02 13:14:55 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-08-02 13:14:55 +0300
commitce833c4ea66902f46b197d336e168a79ac29be81 (patch)
tree89b181babf5b90c171e04565e5d6a3911ebfbe88
parentff6a28eeb5c58185a178f7bbacc5617ac6b80ef4 (diff)
parent888d63c7a1536298c3a174a1e2ae5fb76d38e80b (diff)
Merge branch 'mk-dont-shadow-git-version' into 'master'
GIT_VERSION: Support both vX.Y.Z and X.Y.Z formats See merge request gitlab-org/gitaly!3711
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1c54dcd86..c1ecc44db 100644
--- a/Makefile
+++ b/Makefile
@@ -80,10 +80,17 @@ PROTOC_VERSION ?= 3.17.3
PROTOC_GEN_GO_VERSION ?= 1.26.0
# https://pkg.go.dev/google.golang.org/grpc/cmd/protoc-gen-go-grpc
PROTOC_GEN_GO_GRPC_VERSION?= 1.1.0
-GIT_VERSION ?= v2.32.0
GIT2GO_VERSION ?= v31
LIBGIT2_VERSION ?= v1.1.0
+# Support both vX.Y.Z and X.Y.Z version patterns, since callers across
+# GitLab use both.
+ifndef GIT_VERSION
+ GIT_VERSION := v2.32.0
+else
+ GIT_VERSION := $(shell echo ${GIT_VERSION} | awk '/^[0-9]\.[0-9]+\.[0-9]+$$/ { printf "v" } { print $$1 }')
+endif
+
# Dependency downloads
ifeq (${OS},Darwin)
PROTOC_URL ?= https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-osx-x86_64.zip