summaryrefslogtreecommitdiffstats
path: root/mk/release.mk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:46:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:46:09 +0000
commit043aa641ad4373e96fd748deb1e7fab3cb579a07 (patch)
treef8fde8a97ab5db152043f6c01043672114c0a4df /mk/release.mk
parentReleasing progress-linux version 2.1.6-5~progress7.99u1. (diff)
downloadpacemaker-043aa641ad4373e96fd748deb1e7fab3cb579a07.tar.xz
pacemaker-043aa641ad4373e96fd748deb1e7fab3cb579a07.zip
Merging upstream version 2.1.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mk/release.mk')
-rw-r--r--mk/release.mk21
1 files changed, 12 insertions, 9 deletions
diff --git a/mk/release.mk b/mk/release.mk
index 7d7259c..b10bcf0 100644
--- a/mk/release.mk
+++ b/mk/release.mk
@@ -1,5 +1,5 @@
#
-# Copyright 2008-2022 the Pacemaker project contributors
+# Copyright 2008-2023 the Pacemaker project contributors
#
# The version control history for this file may have further details.
#
@@ -13,10 +13,12 @@ COMMIT ?= HEAD
# TAG defaults to DIST when in a source distribution instead of a git checkout,
# the tag name if COMMIT is tagged, and the full commit ID otherwise.
-TAG ?= $(shell \
- T=$$(git describe --tags --exact-match '$(COMMIT)' 2>/dev/null); \
- [ -n "$${T}" ] && echo "$${T}" \
- || git log --pretty=format:%H -n 1 '$(COMMIT)' 2>/dev/null \
+TAG ?= $(shell \
+ T=$$("$(GIT)" describe --tags --exact-match '$(COMMIT)' \
+ 2>/dev/null); \
+ [ -n "$${T}" ] && echo "$${T}" \
+ || "$(GIT)" log --pretty=format:%H -n 1 '$(COMMIT)' \
+ 2>/dev/null \
|| echo DIST)
# If DIRTY=anything is passed to make, generated versions will end in ".mod"
@@ -24,7 +26,8 @@ TAG ?= $(shell \
# default.
DIRTY_EXT = $(shell [ -n "$(DIRTY)" ] \
&& [ "$(COMMIT)" == "HEAD" ] \
- && ! git diff-index --quiet HEAD -- 2>/dev/null \
+ && ! "$(GIT)" diff-index --quiet HEAD -- \
+ 2>/dev/null \
&& echo .mod)
# These can be used in case statements to avoid make interpreting parentheses
@@ -32,14 +35,14 @@ lparen = (
rparen = )
# This will be empty if not in a git checkout
-CHECKOUT = $(shell git rev-parse --git-dir 2>/dev/null)
+CHECKOUT = $(shell "$(GIT)" rev-parse --git-dir 2>/dev/null)
# VERSION is set by configure, but we allow some make targets to be run without
# running configure first, so set a reasonable default in that case.
VERSION ?= $(shell if [ -z "$(CHECKOUT)" ]; then \
echo 0.0.0; \
else \
- git tag -l \
+ "$(GIT)" tag -l \
| sed -n -e 's/^\(Pacemaker-[0-9.]*\)$$/\1/p' \
| sort -Vr | head -n 1; \
fi)
@@ -83,5 +86,5 @@ top_distdir = $(PACKAGE)-$(shell \
Pacemaker-*$(rparen) \
echo '$(TAG)' | cut -c11-;; \
*$(rparen) \
- git log --pretty=format:%h -n 1 '$(TAG)';; \
+ "$(GIT)" log --pretty=format:%h -n 1 '$(TAG)';; \
esac)$(DIRTY_EXT)