From 753a639aa368adbb053f9e8362c6e7bd71db5f55 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 3 Apr 2020 16:01:14 -0700 Subject: rework --- bin/buildssrht-preupload | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/bin/buildssrht-preupload b/bin/buildssrht-preupload index 347aa771..12751693 100755 --- a/bin/buildssrht-preupload +++ b/bin/buildssrht-preupload @@ -44,14 +44,17 @@ chomp(my $source = `dpkg-parsechangelog -SSource`); chomp(my $version = `dpkg-parsechangelog -SVersion`); my $note = "Pre-upload checks for $source $version"; -my $chroot = "$dist-amd64-sbuild"; +my $schroot = "$dist-amd64-sbuild"; my $changes = "${source}_${version}_multi.changes"; my $manifest->{image} = "debian/unstable"; $manifest->{sources} = [$clone_uri]; $manifest->{packages} = ["autopkgtest", "devscripts", "dgit", "lintian", "piuparts", "sbuild"]; -my @tasks = ({ + +$manifest->{tasks} = [ + map +({ $_->[0] => join "\n", $_->[1]->@*, "" }), + [ setup => [ "cd $source", "git deborig || origtargz", @@ -62,28 +65,20 @@ my @tasks = ({ --command-prefix=eatmydata --include=eatmydata), $dist, - "/srv/chroot/$chroot" + "/srv/chroot/$schroot" ), "sudo sbuild-adduser \$USER" ] - }, - { + ], + [ build => [ "cd $source", "dgit --quilt=$quilt sbuild -d $dist --no-run-lintian" ] - }, - { lintian => ["lintian $changes"] }, - { - piuparts => - ["sudo piuparts --no-eatmydata --schroot $chroot foo $changes"] - }, - { - autopkgtest => ["autopkgtest $changes -- schroot $chroot"] }); -foreach my $task (@tasks) { - my ($k, $v) = each %$task; - push $manifest->{tasks}->@*, { $k => join "\n", @$v, "" }; -} + ], + [lintian => ["lintian $changes"]], + [piuparts => ["sudo piuparts --no-eatmydata --schroot $schroot $changes"]], + [autopkgtest => ["autopkgtest $changes -- schroot $schroot"]]]; my $client = REST::Client->new; $client->setHost("https://builds.sr.ht"); -- cgit v1.2.3