]> git.proxmox.com Git - mirror_corosync-qdevice.git/commit
build: Support for git archive stored tags
authorJan Friesse <jfriesse@redhat.com>
Mon, 3 Sep 2018 15:01:21 +0000 (17:01 +0200)
committerJan Friesse <jfriesse@redhat.com>
Mon, 3 Sep 2018 15:01:21 +0000 (17:01 +0200)
commita09c6604ce50204003b0313e99cd5d493be992aa
tree52290884fdb35470c3e966315fd80da3ec38100c
parent9186129ace564183932cc4b0fb64c24115fd4965
build: Support for git archive stored tags

Attempt to solve problem with git archive generated tarballs
(used for example by github when release is downloaded) which are no
longer git tree and (in contrast to officially released tarballs) also
doesn't contain .tarball-version file so git-version-gen script simply
cannot obtain valid version info.

Solution is based on using gitattributes which is instructs git to
replace string in the .gitarchivever file by known ref names.
git-version-gen is enhanced to support this file and tries to parse
any string which looks like "tag: v[0-9]+.[0-9]+.[0-9]". If such string
is found it's used as a version. This file is used as a last attempt and
other methods (.tarball-version, git abbrev) have precedence.

Based on idea stated by Jan Pokorný <jpokorny@redhat.com>.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
.gitarchivever [new file with mode: 0644]
.gitattributes [new file with mode: 0644]
build-aux/git-version-gen
configure.ac