summaryrefslogtreecommitdiff
path: root/vendor/update
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2023-06-20 01:06:13 +0100
committerSadie Powell <sadie@witchery.services>2023-06-20 01:06:35 +0100
commit4a6f4bc92fbf447c2aea52df78814514e7e3d60b (patch)
tree9aa56c31d11974caf3baf35c6b9972f34aa7f2d8 /vendor/update
parent1c30205af57dee259b2610fb4b2aadb4d4a06d61 (diff)
Pull in the upstream changes from InspIRCd's vendoring tool.
Diffstat (limited to 'vendor/update')
-rwxr-xr-xvendor/update10
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/update b/vendor/update
index 5d2cbedb6..df7056d23 100755
--- a/vendor/update
+++ b/vendor/update
@@ -56,10 +56,18 @@ 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`);
+ if (defined $info->{patches}) {
+ my $patches = catfile($unpackdir, $info->{patches});
+ for my $patch (glob $patches) {
+ $success |= execute 'git', '-C', $unpackdir, 'apply', $patch;
+ }
+ }
} elsif (defined $info->{tarball}) {
my $tarball = catfile $unpackdir, basename $info->{tarball};
$success ||= execute 'wget', '--output-document', $tarball, $info->{tarball};