cmake: Compute PATCH from the lastest vX.0 version

This commit is contained in:
Corentin Le Molgat
2022-05-27 15:05:13 +02:00
parent 5ab0549db0
commit 2c72f93aed
2 changed files with 11 additions and 21 deletions

View File

@@ -124,7 +124,7 @@ SUFFIXES =
OR_TOOLS_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
OR_TOOLS_SHA1 := $(shell git rev-parse --verify HEAD)
include ../../Version.txt
OR_TOOLS_PATCH := $(shell git rev-list --count HEAD)
OR_TOOLS_PATCH := $(shell git rev-list --count v${OR_TOOLS_MAJOR}.0..HEAD)
OR_TOOLS_VERSION := ${OR_TOOLS_MAJOR}.${OR_TOOLS_MINOR}.${OR_TOOLS_PATCH}
ifdef PRE_RELEASE
OR_TOOLS_VERSION := ${OR_TOOLS_VERSION}-rc