Backport the changes to the vendoring tool from master.

This commit is contained in:
Sadie Powell 2023-02-21 17:07:33 +00:00
parent 61189c9eb6
commit f94635cd71

4
vendor/update vendored
View File

@ -49,7 +49,9 @@ while (my ($name, $info) = each %{$data}) {
my $vendordir = catdir $RealDir, $name;
my $success = 0;
if (defined $info->{git}) {
$success ||= execute 'git', 'clone', $info->{git}, $unpackdir;
my @extra_args;
push @extra_args, '--branch', $info->{branch} if defined $info->{branch};
$success ||= execute 'git', 'clone', @extra_args, $info->{git}, $unpackdir;
chomp(my $tag = `git -C $unpackdir describe --abbrev=0 --tags HEAD 2>/dev/null`) unless $success;
$success ||= execute 'git', '-C', $unpackdir, 'checkout', $tag if $tag;
chomp($info->{version} = `git -C $unpackdir describe --always --tags HEAD 2>/dev/null`);