]> git.proxmox.com Git - mirror_spl.git/commitdiff
Fix automatically generated release number
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 21 Sep 2016 20:44:32 +0000 (13:44 -0700)
committerGitHub <noreply@github.com>
Wed, 21 Sep 2016 20:44:32 +0000 (13:44 -0700)
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 <cks.git01@cs.toronto.edu>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue zfsonlinux/zfs#5105
Closes #572

config/spl-meta.m4

index 0561fbbc580ec2d23b6e9076ea105cc2630e0676..fbfaec4ab5192267dfbb7e4bcfae3e8919774eb4 100644 (file)
@@ -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