diff options
author | Matthias Käppler <mkaeppler@gitlab.com> | 2021-08-02 13:14:55 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-08-02 13:14:55 +0300 |
commit | 888d63c7a1536298c3a174a1e2ae5fb76d38e80b (patch) | |
tree | 89b181babf5b90c171e04565e5d6a3911ebfbe88 /Makefile | |
parent | ff6a28eeb5c58185a178f7bbacc5617ac6b80ef4 (diff) |
GIT_VERSION: Support both vX.Y.Z and X.Y.Z formats
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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 |