From 66e93f5e4e1a6c573fc57f9f76eb09c6cffd085e Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 21 Sep 2016 13:45:21 -0700 Subject: 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 Signed-off-by: Brian Behlendorf Closes #5105 Closes #5140 --- config/zfs-meta.m4 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config') diff --git a/config/zfs-meta.m4 b/config/zfs-meta.m4 index 7c92dd541..3e1429d99 100644 --- a/config/zfs-meta.m4 +++ b/config/zfs-meta.m4 @@ -74,6 +74,14 @@ AC_DEFUN([ZFS_AC_META], [ if test -n "${_release}"; then ZFS_META_RELEASE=${_release} _zfs_ac_meta_type="git describe" + else + _match="${ZFS_META_NAME}-${ZFS_META_VERSION}-${ZFS_META_RELEASE}" + _alias=$(git describe --match=${_match} 2>/dev/null) + _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g') + if test -n "${_release}"; then + ZFS_META_RELEASE=${_release} + _zfs_ac_meta_type="git describe" + fi fi fi -- cgit v1.2.3