summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2016-09-21 13:45:21 -0700
committerGitHub <[email protected]>2016-09-21 13:45:21 -0700
commit66e93f5e4e1a6c573fc57f9f76eb09c6cffd085e (patch)
tree7037ea6f335f73c4db3980926e4368caa766109e /config
parentda8d57488b6cf6078ccb53a6f559a2f64bba7264 (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]> Closes #5105 Closes #5140
Diffstat (limited to 'config')
-rw-r--r--config/zfs-meta.m48
1 files changed, 8 insertions, 0 deletions
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