aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2016-09-21 13:44:32 -0700
committerGitHub <[email protected]>2016-09-21 13:44:32 -0700
commit8acfb2bcc118555fed2c0902c33d300a57630368 (patch)
tree1e5b04fe91bc600ed018f29311bf332559b0cf81 /config
parentcb81c0c5887ffd6d862b13bca594d522e3f8673c (diff)
Fix automatically generated release number
When building from the head of a branch a release number is automatically generated with `git describe` using the last tag on that branch as the base. For this to work the last tag on the branch needs to be predictable given the current META file. This logic was accidentally broken when an -rcX tag was added to the branch. Update it to search for a VERSION or VERSION-RELEASE tag. Reviewed-by: Chris Siebenmann <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue zfsonlinux/zfs#5105 Closes #572
Diffstat (limited to 'config')
-rw-r--r--config/spl-meta.m48
1 files changed, 8 insertions, 0 deletions
diff --git a/config/spl-meta.m4 b/config/spl-meta.m4
index 0561fbbc5..fbfaec4ab 100644
--- a/config/spl-meta.m4
+++ b/config/spl-meta.m4
@@ -63,6 +63,14 @@ AC_DEFUN([SPL_AC_META], [
if test -n "${_release}"; then
SPL_META_RELEASE=${_release}
_spl_ac_meta_type="git describe"
+ else
+ _match="${SPL_META_NAME}-${SPL_META_VERSION}-${SPL_META_RELEASE}"
+ _alias=$(git describe --match=${_match} 2>/dev/null)
+ _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g')
+ if test -n "${_release}"; then
+ SPL_META_RELEASE=${_release}
+ _spl_ac_meta_type="git describe"
+ fi
fi
fi