mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-14 17:59:59 +00:00
gitpkgv.bbclass: Support also lightweight tags
When checking for commit specific tags during GITPKGVTAG resolution, use additional '--tags' and '--exact-match' options for 'git describe' command. This changes the behaviour so that in case an annotated tag does not exist for the particular commit, then the latest lightweight (non-annotated) tag is used instead, in case that commit has at least one such tag. Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
committed by
Armin Kuster
parent
81e1ae4657
commit
e5cba1a54c
@@ -7,8 +7,8 @@
|
|||||||
# NN equals the total number of revs up to SRCREV
|
# NN equals the total number of revs up to SRCREV
|
||||||
# GITHASH is SRCREV's (full) hash
|
# GITHASH is SRCREV's (full) hash
|
||||||
#
|
#
|
||||||
# - GITPKGVTAG which is the output of 'git describe' allowing for
|
# - GITPKGVTAG which is the output of 'git describe --tags --exact-match'
|
||||||
# automatic versioning
|
# allowing for automatic versioning
|
||||||
#
|
#
|
||||||
# gitpkgv.bbclass assumes the git repository has been cloned, and
|
# gitpkgv.bbclass assumes the git repository has been cloned, and
|
||||||
# contains SRCREV. So ${GITPKGV} and ${GITPKGVTAG} should never be
|
# contains SRCREV. So ${GITPKGV} and ${GITPKGVTAG} should never be
|
||||||
@@ -103,7 +103,7 @@ def get_git_pkgv(d, use_tags):
|
|||||||
if use_tags:
|
if use_tags:
|
||||||
try:
|
try:
|
||||||
output = bb.fetch2.runfetchcmd(
|
output = bb.fetch2.runfetchcmd(
|
||||||
"git --git-dir=%(repodir)s describe %(rev)s 2>/dev/null"
|
"git --git-dir=%(repodir)s describe %(rev)s --tags --exact-match 2>/dev/null"
|
||||||
% vars, d, quiet=True).strip()
|
% vars, d, quiet=True).strip()
|
||||||
ver = gitpkgv_drop_tag_prefix(output)
|
ver = gitpkgv_drop_tag_prefix(output)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Reference in New Issue
Block a user